]> granicus.if.org Git - strace/commit
xlat: use unsgined type for mount_flags fallback values
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 17 Oct 2019 11:13:45 +0000 (13:13 +0200)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 18 Oct 2019 19:00:26 +0000 (21:00 +0200)
commit2b64854e5a975326df46a86be0aac3a3929fc2d7
treec151cf3c65a646644ac35a2080845d9d52de9678
parentbade0cb3cbe109026faeff913ebe4272553d316c
xlat: use unsgined type for mount_flags fallback values

Reported by cppcheck:

    strace/xlat/mount_flags.h:256: error[shiftTooManyBitsSigned]:
    Shifting signed 32-bit value by 31 bits is undefined behaviour
    #  254|    XLAT(MS_BORN),
    #  255|    XLAT(MS_ACTIVE),
    #  256|->  XLAT(MS_NOUSER),
    #  257|    XLAT_END
    #  258|   };

* xlat/mount_flags.in: Use 1U instead of 1 as a bit shifting operand.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1747524
xlat/mount_flags.in