summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-28 20:02:49 +0000
committerpfg <pfg@FreeBSD.org>2013-12-28 20:02:49 +0000
commit4eef328225427f2fe373947481338f803da1c0fc (patch)
tree2c88295903d00d2eab10e8455a6326601d62afa6 /contrib/gcc
parentcc424717c7eb1d10fe4b9b87b6dfb24cc85a6d7f (diff)
downloadFreeBSD-src-4eef328225427f2fe373947481338f803da1c0fc.zip
FreeBSD-src-4eef328225427f2fe373947481338f803da1c0fc.tar.gz
MFC r259666, r259696:
gcc: warnings from -Wformat-security Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/c-common.c4
-rw-r--r--contrib/gcc/c-convert.c2
-rw-r--r--contrib/gcc/c-incpath.c8
-rw-r--r--contrib/gcc/c-typeck.c6
-rw-r--r--contrib/gcc/cfg.c2
-rw-r--r--contrib/gcc/collect2.c8
-rw-r--r--contrib/gcc/cp/cvt.c2
-rw-r--r--contrib/gcc/cp/pt.c2
-rw-r--r--contrib/gcc/cp/typeck.c4
-rw-r--r--contrib/gcc/fold-const.c2
-rw-r--r--contrib/gcc/gcc.c4
-rw-r--r--contrib/gcc/gcov.c2
-rw-r--r--contrib/gcc/tlink.c2
13 files changed, 24 insertions, 24 deletions
diff --git a/contrib/gcc/c-common.c b/contrib/gcc/c-common.c
index c2f0d4e..f4edb52 100644
--- a/contrib/gcc/c-common.c
+++ b/contrib/gcc/c-common.c
@@ -5983,11 +5983,11 @@ c_parse_error (const char *gmsgid, enum cpp_ttype token, tree value)
message = NULL;
}
else
- error (gmsgid);
+ error (gmsgid, "");
if (message)
{
- error (message);
+ error (message, "");
free (message);
}
#undef catenate_messages
diff --git a/contrib/gcc/c-convert.c b/contrib/gcc/c-convert.c
index bf306c8..b2b5ea1 100644
--- a/contrib/gcc/c-convert.c
+++ b/contrib/gcc/c-convert.c
@@ -80,7 +80,7 @@ convert (tree type, tree expr)
if ((invalid_conv_diag
= targetm.invalid_conversion (TREE_TYPE (expr), type)))
{
- error (invalid_conv_diag);
+ error (invalid_conv_diag, "");
return error_mark_node;
}
diff --git a/contrib/gcc/c-incpath.c b/contrib/gcc/c-incpath.c
index 0e534dd..55025ff 100644
--- a/contrib/gcc/c-incpath.c
+++ b/contrib/gcc/c-incpath.c
@@ -72,7 +72,7 @@ free_path (struct cpp_dir *path, int reason)
case REASON_DUP_SYS:
fprintf (stderr, _("ignoring duplicate directory \"%s\"\n"), path->name);
if (reason == REASON_DUP_SYS)
- fprintf (stderr,
+ fprintf (stderr, "%s",
_(" as it is a non-system directory that duplicates a system directory\n"));
break;
@@ -292,16 +292,16 @@ merge_include_chains (cpp_reader *pfile, int verbose)
{
struct cpp_dir *p;
- fprintf (stderr, _("#include \"...\" search starts here:\n"));
+ fprintf (stderr, "%s", _("#include \"...\" search starts here:\n"));
for (p = heads[QUOTE];; p = p->next)
{
if (p == heads[BRACKET])
- fprintf (stderr, _("#include <...> search starts here:\n"));
+ fprintf (stderr, "%s", _("#include <...> search starts here:\n"));
if (!p)
break;
fprintf (stderr, " %s\n", p->name);
}
- fprintf (stderr, _("End of search list.\n"));
+ fprintf (stderr, "%s", _("End of search list.\n"));
}
}
diff --git a/contrib/gcc/c-typeck.c b/contrib/gcc/c-typeck.c
index d19219f..8941611 100644
--- a/contrib/gcc/c-typeck.c
+++ b/contrib/gcc/c-typeck.c
@@ -2584,7 +2584,7 @@ convert_arguments (tree typelist, tree values, tree function, tree fundecl)
else if ((invalid_func_diag =
targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val)))
{
- error (invalid_func_diag);
+ error (invalid_func_diag, "");
return error_mark_node;
}
else
@@ -2781,7 +2781,7 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
if ((invalid_op_diag
= targetm.invalid_unary_op (code, TREE_TYPE (xarg))))
{
- error (invalid_op_diag);
+ error (invalid_op_diag, "");
return error_mark_node;
}
@@ -7819,7 +7819,7 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
if ((invalid_op_diag
= targetm.invalid_binary_op (code, type0, type1)))
{
- error (invalid_op_diag);
+ error (invalid_op_diag, "");
return error_mark_node;
}
diff --git a/contrib/gcc/cfg.c b/contrib/gcc/cfg.c
index ec11f43..8df5bcd 100644
--- a/contrib/gcc/cfg.c
+++ b/contrib/gcc/cfg.c
@@ -830,7 +830,7 @@ dump_cfg_bb_info (FILE *file, basic_block bb)
else
fprintf (file, ", ");
first = false;
- fputs (bb_bitnames[i], file);
+ fprintf (file, "%s", bb_bitnames[i]);
}
if (!first)
fprintf (file, ")");
diff --git a/contrib/gcc/collect2.c b/contrib/gcc/collect2.c
index c6c1f3f..7921f26 100644
--- a/contrib/gcc/collect2.c
+++ b/contrib/gcc/collect2.c
@@ -1562,10 +1562,10 @@ collect_execute (const char *prog, char **argv, const char *outname,
if (err != 0)
{
errno = err;
- fatal_perror (errmsg);
+ fatal_perror ("%s", errmsg);
}
else
- fatal (errmsg);
+ fatal ("%s", errmsg);
}
return pex;
@@ -2050,10 +2050,10 @@ scan_prog_file (const char *prog_name, enum pass which_pass)
if (err != 0)
{
errno = err;
- fatal_perror (errmsg);
+ fatal_perror ("%s", errmsg);
}
else
- fatal (errmsg);
+ fatal ("%s", errmsg);
}
int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN);
diff --git a/contrib/gcc/cp/cvt.c b/contrib/gcc/cp/cvt.c
index 75c930d..fedd1c6 100644
--- a/contrib/gcc/cp/cvt.c
+++ b/contrib/gcc/cp/cvt.c
@@ -615,7 +615,7 @@ ocp_convert (tree type, tree expr, int convtype, int flags)
if ((invalid_conv_diag
= targetm.invalid_conversion (TREE_TYPE (expr), type)))
{
- error (invalid_conv_diag);
+ error (invalid_conv_diag, "");
return error_mark_node;
}
diff --git a/contrib/gcc/cp/pt.c b/contrib/gcc/cp/pt.c
index f12fc7b..1a5c20f 100644
--- a/contrib/gcc/cp/pt.c
+++ b/contrib/gcc/cp/pt.c
@@ -8925,7 +8925,7 @@ tsubst_copy_and_build (tree t,
/*template_arg_p=*/false,
&error_msg);
if (error_msg)
- error (error_msg);
+ error ("%s", error_msg);
if (!function_p && TREE_CODE (decl) == IDENTIFIER_NODE)
decl = unqualified_name_lookup_error (decl);
return decl;
diff --git a/contrib/gcc/cp/typeck.c b/contrib/gcc/cp/typeck.c
index 1db89b49..adba2e1 100644
--- a/contrib/gcc/cp/typeck.c
+++ b/contrib/gcc/cp/typeck.c
@@ -3107,7 +3107,7 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
if ((invalid_op_diag
= targetm.invalid_binary_op (code, type0, type1)))
{
- error (invalid_op_diag);
+ error (invalid_op_diag, "");
return error_mark_node;
}
@@ -4034,7 +4034,7 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
: code),
TREE_TYPE (xarg))))
{
- error (invalid_op_diag);
+ error (invalid_op_diag, "");
return error_mark_node;
}
diff --git a/contrib/gcc/fold-const.c b/contrib/gcc/fold-const.c
index e43fb3b..a060bc9 100644
--- a/contrib/gcc/fold-const.c
+++ b/contrib/gcc/fold-const.c
@@ -992,7 +992,7 @@ fold_overflow_warning (const char* gmsgid, enum warn_strict_overflow_code wc)
}
}
else if (issue_strict_overflow_warning (wc))
- warning (OPT_Wstrict_overflow, gmsgid);
+ warning (OPT_Wstrict_overflow, "%s", gmsgid);
}
/* Return true if the built-in mathematical function specified by CODE
diff --git a/contrib/gcc/gcc.c b/contrib/gcc/gcc.c
index 62d248b..5ed3a82 100644
--- a/contrib/gcc/gcc.c
+++ b/contrib/gcc/gcc.c
@@ -2974,7 +2974,7 @@ execute (void)
if (errmsg != NULL)
{
if (err == 0)
- fatal (errmsg);
+ fatal ("%s", errmsg);
else
{
errno = err;
@@ -6525,7 +6525,7 @@ main (int argc, char **argv)
if (! verbose_flag)
{
- printf (_("\nFor bug reporting instructions, please see:\n"));
+ printf ("%s", _("\nFor bug reporting instructions, please see:\n"));
printf ("%s.\n", bug_report_url);
return (0);
diff --git a/contrib/gcc/gcov.c b/contrib/gcc/gcov.c
index 3b249c7..e973b04 100644
--- a/contrib/gcc/gcov.c
+++ b/contrib/gcc/gcov.c
@@ -417,7 +417,7 @@ print_version (void)
fnotice (stdout, "gcov (GCC) %s\n", version_string);
fprintf (stdout, "Copyright %s 2006 Free Software Foundation, Inc.\n",
_("(C)"));
- fnotice (stdout,
+ fnotice (stdout, "%s",
_("This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or \n"
"FITNESS FOR A PARTICULAR PURPOSE.\n\n"));
diff --git a/contrib/gcc/tlink.c b/contrib/gcc/tlink.c
index 7907f41..595e9ed 100644
--- a/contrib/gcc/tlink.c
+++ b/contrib/gcc/tlink.c
@@ -381,7 +381,7 @@ read_repo_file (file *f)
FILE *stream = fopen (f->key, "r");
if (tlink_verbose >= 2)
- fprintf (stderr, _("collect: reading %s\n"), f->key);
+ fprintf (stderr, "%s", _("collect: reading %s\n"), f->key);
while (fscanf (stream, "%c ", &c) == 1)
{
OpenPOWER on IntegriCloud