From: Bernhard Voelker Date: Thu, 24 Jul 2014 13:30:54 +0000 (+0200) Subject: mcookie: avoid format warning X-Git-Tag: v2.26-rc1~591 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ada74f3f322e672ed4f546eec0b7539566e09a90;p=thirdparty%2Futil-linux.git mcookie: avoid format warning "gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]" issued the following warning: warning: format ‘%zu’ expects argument of type ‘size_t’, \ but argument 3 has type ‘int’ [-Wformat=] * misc-utils/mcookie.c (main): Change format from %zu to %d. RAND_BYTES is an enum, thus of type int. Signed-off-by: Bernhard Voelker --- diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c index a46ea0c47e..c370c2ae80 100644 --- a/misc-utils/mcookie.c +++ b/misc-utils/mcookie.c @@ -182,8 +182,8 @@ int main(int argc, char **argv) random_get_bytes(&buf, RAND_BYTES); MD5Update(&ctl.ctx, buf, RAND_BYTES); if (ctl.verbose) - fprintf(stderr, P_("Got %zu byte from %s\n", - "Got %zu bytes from %s\n", RAND_BYTES), + fprintf(stderr, P_("Got %d byte from %s\n", + "Got %d bytes from %s\n", RAND_BYTES), RAND_BYTES, random_tell_source()); MD5Final(digest, &ctl.ctx);