I noticed when compiling tar on cygwin that I got a warning:
if gcc -DHAVE_CONFIG_H -DLIBDIR=\"/usr/local/lib\" -I. -I. -I..     -g2 -Wall 
-Werror -MT argp-help.o -MD -MP -MF ".deps/argp-help.Tpo" -c -o argp-help.o 
argp-help.c; \
then mv -f ".deps/argp-help.Tpo" ".deps/argp-help.Po"; else rm -f 
".deps/argp-help.Tpo"; exit 1; fi
argp-help.c:1693:4: #warning No reasonable value to return

Further looking at the argp-help module shows that tries using
strrchr(program_invocation_name, '/') which is not portable
to platforms with \ as a directory separator (it would be better
to use the dirname module).  Furthermore, since the warning
comes during the fallback when program_invocation_name
does not exist, it would probably be wise to change argp-help
to use program_name in the same way that the error module
does.

I also noticed that progname.c also does strrchr(argv0, '/'),
another candidate for using the dirname module.

--
Eric Blake


_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to