emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master b9ac4f8.. (Fix locating pdump by symlink) breaks with stow


From: Ergus
Subject: Re: master b9ac4f8.. (Fix locating pdump by symlink) breaks with stow
Date: Mon, 24 Jun 2019 13:10:50 +0200
User-agent: NeoMutt/20180716

Hi:

I am getting the new warning after commit b9ac4f815ebaa1a. It is just a
warning but it is right.

../../emacs_git/src/emacs.c:752:5: warning: ???%s??? directive argument is
null [-Wformat-overflow=]

This is the code.

750|  char* argv0 = realpath (argv[0], NULL);
751|  if (!argv0)
752|    fatal ("could not resolve realpath of \"%s\": %s",
752|           argv0, strerror (errno));

The format %s expects a char[] but in this case argv0 is NULL, thats
where the warning is coming from.

On the other hand I see that realpath() was called with NULL as a second
parameter, in that case it internally invokes a malloc, so there should
be a free for it somewhere.


On Mon, Jun 24, 2019 at 12:26:00PM +0200, Yuri D'Elia wrote:
% which emacs
/usr/local/bin/emacs
% ls -l =emacs
/usr/local/bin/emacs -> ../stow/emacs-20190624/bin/emacs
% emacs
emacs: could not resolve realpath of "(null)": No such file or directory

reverting commit b9ac4f815ebaa1acb0d045fe9583f665efa6f628 fixes the
issue.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]