[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: disabling warn_unused_result attribute with FORTIFY_SOURCE?
- From: Kevin Kofler <kevin kofler chello at>
- To: fedora-devel-list redhat com
- Subject: Re: disabling warn_unused_result attribute with FORTIFY_SOURCE?
- Date: Thu, 22 Mar 2007 10:32:19 +0000 (UTC)
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]