https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113050
--- Comment #1 from Florian Weimer <fw at gcc dot gnu.org> --- The warning should be -Wdiscared-qualifiers, which is not an error for C. What confused me is that the volatile qualifier is already accepted for the first argument. I believe it's valid for the second argument.