[sharutils] Compilation with -Werror=format-security fails
Petr Pisar <[email protected]>
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Fedora tries to compile all packages with GCC -Werror=format-security option,
and sharutils fails with:
gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I../libopts
-I. -I.. -I../lib -I../lib -I../intl -Wno-format-contains-nul -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-Werror=format-security -Wno-format-contains-nul -c -o shar.o shar.c
shar.c: In function ‘print_header_stamp’:
shar.c:929:7: error: format not a string literal and no format arguments
[-Werror=format-security]
error (0, errno, _("Cannot get current directory name"));
This is caused by aoGetsText() in src/shar-opts.h not being marked with
__attribute__ ((format_arg(1))).
-- Petr
signature.asc
(application/pgp-signature, 230 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EABEIAAYFAlKfM54ACgkQEsnFx2fG+qKR9QD/QkcgYeuozX5B8za2SFQINCNV 3fv+ZecKN+aetkkPH6wA/R2lK0k+ZWjzTsG8l13NRC3ZaZDSaKJDmUeFn06Gofuf =dBhu -----END PGP SIGNATURE-----