On Tue, Jul 30, 2024 at 11:01 AM Stephen Smalley <stephen.smalley.work@xxxxxxxxx> wrote: > > On Mon, Jul 1, 2024 at 2:27 PM James Carter <jwcart2@xxxxxxxxx> wrote: > > > > Trying to compile libselinux for 32-bit produces the following error: > > > > selinux_restorecon.c:1194:31: error: comparison of integer expressions of different signedness: ‘__fsword_t’ {aka ‘int’} and ‘unsigned int’ [-Werror=sign-compare] > > 1194 | if (state.sfsb.f_type == RAMFS_MAGIC || state.sfsb.f_type == TMPFS_MAGIC || > > | ^~ > > > > Since RAMFS_MAGIC = 0x858458f6 == 2240043254, which > 2^31, but < 2^32, > > cast both as uint32_t for the comparison. > > > > Reported-by: Daniel Schepler > > Signed-off-by: James Carter <jwcart2@xxxxxxxxx> > > Acked-by: Stephen Smalley <stephen.smalley.work@xxxxxxxxx> Applied.