See bug 66425 for the cast to (void) to ignore warn_unused_result for a single case:
It looks like clang is already doing the right thing here... https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425#c2 gcc should catch up. Cheers, Filipe -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/305176 Title: [PR25509] can't disable __attribute__((warn_unused_result)) To manage notifications about this bug go to: https://bugs.launchpad.net/glibc/+bug/305176/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs