From: Sami Kerola Date: Sun, 31 Mar 2019 11:52:37 +0000 (+0100) Subject: cron: fix type in comparison X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c37a017fd22c6d9d60b749a5e634b4cb6b810e5a;p=cronie cron: fix type in comparison Use of size_t in this context should be also safer from bit shift perspective, risk of overflowing it is smaller. cronnext.c:80:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (f = 1; f < sizeof(flagname); f = f << 1) ^ Signed-off-by: Sami Kerola --- diff --git a/src/cronnext.c b/src/cronnext.c index bd6545b..f6ac97f 100644 --- a/src/cronnext.c +++ b/src/cronnext.c @@ -81,7 +81,7 @@ const char *flagname[]= { }; void printflags(char *indent, int flags) { - int f; + size_t f; int first = 1; printf("%s flagnames:", indent);