bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] argp-help and program name


From: Eric Blake
Subject: [Bug-tar] argp-help and program name
Date: Thu, 08 Dec 2005 21:22:49 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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).  Since the warning comes during the fallback
when program_invocation_name does not exist, and since tar uses the error
module which already expects program_name to exist, it would probably be
wise to change argp-help to use program_name in the same way that the
error module does.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDmQaZ84KuGfSFAYARAq03AJ97NAErnjA9320YQzPCJqCDEIbeYQCgrzTl
gXmZsQcCSmL0C+2bxfAjYo0=
=SdqC
-----END PGP SIGNATURE-----




reply via email to

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