diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-22 03:11:24 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-22 03:11:24 +0000 |
commit | 155b601bdd70ce24fe71812997ea01ebc53362e5 (patch) | |
tree | 58cd4ea16457257e1357a3420d2dd7b9392a2f62 /gcc/c-common.c | |
parent | 8502bb85ff478fcc85896f0455d2bfb9b3f239fb (diff) | |
download | gcc-155b601bdd70ce24fe71812997ea01ebc53362e5.tar.gz |
... Add warning control to warning call.
* c-common.c (check_function_sentinel): Likewise.
(check_nonnull_arg): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 3c341d87b0c..8646b4cc7ee 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -5259,7 +5259,8 @@ check_function_sentinel (tree attrs, tree params, tree typelist) } if (typelist || !params) - warning (0, "not enough variable arguments to fit a sentinel"); + warning (OPT_Wformat, + "not enough variable arguments to fit a sentinel"); else { tree sentinel, end; @@ -5281,7 +5282,8 @@ check_function_sentinel (tree attrs, tree params, tree typelist) } if (pos > 0) { - warning (0, "not enough variable arguments to fit a sentinel"); + warning (OPT_Wformat, + "not enough variable arguments to fit a sentinel"); return; } @@ -5302,7 +5304,7 @@ check_function_sentinel (tree attrs, tree params, tree typelist) We warn with -Wstrict-null-sentinel, though. */ && (warn_strict_null_sentinel || null_node != TREE_VALUE (sentinel))) - warning (0, "missing sentinel in function call"); + warning (OPT_Wformat, "missing sentinel in function call"); } } } @@ -5344,8 +5346,8 @@ check_nonnull_arg (void * ARG_UNUSED (ctx), tree param, return; if (integer_zerop (param)) - warning (0, "null argument where non-null required (argument %lu)", - (unsigned long) param_num); + warning (OPT_Wnonnull, "null argument where non-null required " + "(argument %lu)", (unsigned long) param_num); } /* Helper for nonnull attribute handling; fetch the operand number |