From: Daniel Lowe Date: Mon, 10 Nov 2008 21:07:52 +0000 (-0500) Subject: Fix non-literal format in printf-style calls X-Git-Tag: v1.6.1-rc1~71 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=42fc1139a07b4292d3e5251c591609126664941a;p=git-core%2Fgit.git Fix non-literal format in printf-style calls 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 --- diff --git a/builtin-check-attr.c b/builtin-check-attr.c index 4921341e3..15a04b717 100644 --- a/builtin-check-attr.c +++ b/builtin-check-attr.c @@ -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); } diff --git a/hash-object.c b/hash-object.c index 20937ff94..846e91a23 100644 --- a/hash-object.c +++ b/hash-object.c @@ -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); }