Re: disabling warn_unused_result attribute with FORTIFY_SOURCE?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux