From: Karel Zak Date: Tue, 28 May 2019 10:17:26 +0000 (+0200) Subject: readprofile: be more explicit with used types [cppcheck] X-Git-Tag: v2.34-rc2~17 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Futil-linux.git;a=commitdiff_plain;h=517debc389414cce263ab1dbbb5a9df02a76a464 readprofile: be more explicit with used types [cppcheck] Signed-off-by: Karel Zak --- diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c index 1d484252ac..1323864376 100644 --- a/sys-utils/readprofile.c +++ b/sys-utils/readprofile.c @@ -263,9 +263,9 @@ int main(int argc, char **argv) size_t i; for (p = buf + 1; p < buf + entries; p++) { - if (*p & ~0U << (sizeof(*buf) * 4)) + if (*p & ~0U << ((unsigned) sizeof(*buf) * 4U)) big++; - if (*p & ((1 << (sizeof(*buf) * 4)) - 1)) + if (*p & ((1U << ((unsigned) sizeof(*buf) * 4U)) - 1U)) small++; } if (big > small) {