Fix non-literal format in printf-style calls
authorDaniel Lowe <dlowe@bitmuse.com>
Mon, 10 Nov 2008 21:07:52 +0000 (16:07 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Nov 2008 22:50:02 +0000 (14:50 -0800)
These were found using gcc 4.3.2-1ubuntu11 with the warning:

warning: format not a string literal and no format arguments

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-check-attr.c
hash-object.c
index 4921341e33033bb4a2449425d6fd76132a67cd16..15a04b7179a09492764d43c16a3ec5ff7cdd1b61 100644 (file)
@@ -97,7 +97,7 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
        else if (stdin_paths && doubledash < argc)
                errstr = "Can't specify files with --stdin";
        if (errstr) {
-               error (errstr);
+               error("%s", errstr);
                usage_with_options(check_attr_usage, check_attr_options);
        }
 
index 20937ff94c1ce6ab7984d7b6b1903307e303eb60..846e91a23126b747fbea8d9a8511f708c3d70e43 100644 (file)
@@ -110,7 +110,7 @@ int main(int argc, const char **argv)
        }
 
        if (errstr) {
-               error (errstr);
+               error("%s", errstr);
                usage_with_options(hash_object_usage, hash_object_options);
        }