]> git.tue.mpg.de Git - paraslash.git/commitdiff
aft.c: Use correct format string for error output.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 19 Dec 2016 23:12:19 +0000 (00:12 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 19 Dec 2016 23:12:19 +0000 (00:12 +0100)
Both ->image_id and ->lyrics_id are of signed type.

Makefile.real
aft.c

index ce4881d29c90c8626e44d384dab14c81e15b11b8..ef52c2eb99288cb80eceeb03c5f2c8635acf4983 100644 (file)
@@ -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 7374db588175ee9b5bf0cfc76e9bbfc0679e2e80..e48708a30398a99915fcf4f704932e3144392989 100644 (file)
--- 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;
                }