[PATCH] linux: Fix integer overflow warnings when including <sys/mount.h> [BZ #32708]

Collin Funk collin.funk1@gmail.com
Tue Mar 25 18:23:00 GMT 2025


Florian Weimer <fweimer@redhat.com> writes:

> This change alters the type of all enum constants from int to unsigned
> int.  Should we keep the type of the other constants?  Or use INT_MIN
> (expanded) for MS_NOUSER?

Since mount(2) expects an unsigned long flags, I feel like changing it
to unsigned should be fine. Since the flags are meant to be OR'd
together, I don't think anyone should be using operators like ==, which
might trigger -Wsign-compare or something like that.

Let me know if you disagree.

Collin


More information about the Libc-alpha mailing list