From be06426625303c59c30c32f0669c1ab915134a5d Mon Sep 17 00:00:00 2001 From: Elvira Khabirova Date: Sat, 11 Jun 2016 20:27:16 +0300 Subject: [PATCH] tests/xgetrlimit.c: fix a warning reported by -Wtype-limits * tests/xgetrlimit.c (sprint_rlim): Explicitly cast constants to the type of argument. --- tests/xgetrlimit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/xgetrlimit.c b/tests/xgetrlimit.c index 5e9d7bdc..d787ce38 100644 --- a/tests/xgetrlimit.c +++ b/tests/xgetrlimit.c @@ -41,10 +41,10 @@ const char * sprint_rlim(kernel_ulong_t lim) { if (sizeof(lim) == sizeof(uint64_t)) { - if (lim == -1ULL) + if (lim == (kernel_ulong_t) -1ULL) return "RLIM64_INFINITY"; } else { - if (lim == -1U) + if (lim == (kernel_ulong_t) -1U) return "RLIM_INFINITY"; } -- 2.40.0