This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
If I understood correctly, newer glibcs have added warn_unused_result
attribute to several functions when compiling with -D_FORTIFY_SOURCE=2.
I think this is a good idea in general, except there are some cases
where I really don't care if the call succeeds or not. Traditionally
it's been possible to use
(void)chdir("/blah");
to disable such warnings in lint, but this doesn't work with gcc. How
about adding support for it?
Of course I could just as well do
if (chdir("/blah") < 0) ;
but that's kind of ugly and not self-explanatory.
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |