[pacman-dev] Warnings with -D_FORTIFY_SOURCE=2
Allan McRae
allan at archlinux.org
Mon Jun 14 05:35:44 EDT 2010
Hi,
Trying to build pacman with the gcc flag -D_FORTIFY_SOURCE=2 gives a
bunch of warnings like:
add.c:586:8: warning: ignoring return value of ‘chdir’, declared with
attribute warn_unused_result
be_files.c:660:9: warning: ignoring return value of ‘fgets’, declared
with attribute warn_unused_result
util.c:146:9: warning: ignoring return value of ‘fwrite’, declared with
attribute warn_unused_result
pacman.c:712:8: warning: ignoring return value of ‘getcwd’, declared
with attribute warn_unused_result
util.c:796:12: warning: ignoring return value of ‘asprintf’, declared
with attribute warn_unused_result
There are 21 warnings in total. Would there be in interest in adding
the return value check (some of which would be basically useless...) and
adding -D_FORTIFY_SOURCE=2 to the CFLAGS when used with --enable-debug?
Allan
More information about the pacman-dev
mailing list