aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 1cfb765..c5899e2 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1529,7 +1529,7 @@ check_format_info (info, params)
/* Functions taking a va_list normally pass a non-literal format
string. These functions typically are declared with
first_arg_num == 0, so avoid warning in those cases. */
- if (info->first_arg_num != 0)
+ if (info->first_arg_num != 0 && warn_format > 1)
warning ("format not a string literal, argument types not checked");
return;
}
@@ -1541,7 +1541,7 @@ check_format_info (info, params)
/* Functions taking a va_list normally pass a non-literal format
string. These functions typically are declared with
first_arg_num == 0, so avoid warning in those cases. */
- if (info->first_arg_num != 0)
+ if (info->first_arg_num != 0 && warn_format > 1)
warning ("format not a string literal, argument types not checked");
return;
}