disabling warn_unused_result attribute with FORTIFY_SOURCE?

Kevin Kofler kevin.kofler at chello.at
Thu Mar 22 10:32:19 UTC 2007


Kevin Kofler <kevin.kofler <at> chello.at> writes:
> What works is:
> int dummy=foo1();
> (void)dummy;
> or:
> static inline __attribute__((always_inline)) int ignore(int x) {return x;}
> ignore(foo1());

Found another way:
__builtin_expect(foo1(),0);
The __builtin_expect hint is of course thrown away because the result is, but 
it gets rid of the warning.

        Kevin Kofler




More information about the fedora-devel-list mailing list