From: Andre Noll Date: Mon, 19 Dec 2016 23:12:19 +0000 (+0100) Subject: aft.c: Use correct format string for error output. X-Git-Tag: v0.5.7~4^2~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=69ba28198b553ab8f3b88116ebccfcec98c1c151;p=paraslash.git aft.c: Use correct format string for error output. Both ->image_id and ->lyrics_id are of signed type. --- diff --git a/Makefile.real b/Makefile.real index ce4881d2..ef52c2eb 100644 --- a/Makefile.real +++ b/Makefile.real @@ -115,6 +115,7 @@ STRICT_CFLAGS += -Wno-sign-compare -Wno-unknown-pragmas STRICT_CFLAGS += -Wformat -Wformat-security STRICT_CFLAGS += -Wmissing-format-attribute STRICT_CFLAGS += -Wdeclaration-after-statement +STRICT_CFLAGS += -Wformat-signedness LDFLAGS += $(clock_gettime_ldflags) diff --git a/aft.c b/aft.c index 7374db58..e48708a3 100644 --- a/aft.c +++ b/aft.c @@ -2043,7 +2043,7 @@ static int com_touch_callback(struct afs_callback_arg *aca) if (cto->image_id >= 0) { ret = img_get_name_by_id(cto->image_id, NULL); if (ret < 0) { - para_printf(&aca->pbout, "invalid image ID: %u\n", + para_printf(&aca->pbout, "invalid image ID: %d\n", cto->image_id); return ret; } @@ -2051,7 +2051,7 @@ static int com_touch_callback(struct afs_callback_arg *aca) if (cto->lyrics_id >= 0) { ret = lyr_get_name_by_id(cto->lyrics_id, NULL); if (ret < 0) { - para_printf(&aca->pbout, "invalid lyrics ID: %u\n", + para_printf(&aca->pbout, "invalid lyrics ID: %d\n", cto->lyrics_id); return ret; }