[llvm-commits] [llvm-gcc-4.2] r64912 - in /llvm-gcc-4.2/branches/Apple/Dib/gcc: fortran/decl.c fortran/intrinsic.c fortran/match.c fortran/matchexp.c fortran/module.c fortran/primary.c fortran/symbol.c stub-c.c
Bill Wendling
isanbard at gmail.com
Wed Feb 18 00:45:52 PST 2009
Author: void
Date: Wed Feb 18 02:45:51 2009
New Revision: 64912
URL: http://llvm.org/viewvc/llvm-project?rev=64912&view=rev
Log:
Merge r64814 from release_25 into Dib:
Provide some default return values for the functions. This silences the warning
and thus unbreaks apple-style build (which is -Werror)
Fix format strings weirdness of fortran f.e. This caused warnings and thus
broke apple-style build (which is -Werror)
Modified:
llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/decl.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/intrinsic.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/match.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/matchexp.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/module.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/primary.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/symbol.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/stub-c.c
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/decl.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/decl.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/decl.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/decl.c Wed Feb 18 02:45:51 2009
@@ -367,7 +367,7 @@
gfc_free_expr (expr);
if (msg != NULL)
{
- gfc_error (msg);
+ gfc_error ("%s", msg);
return MATCH_ERROR;
}
tail->repeat = tmp;
@@ -1450,7 +1450,7 @@
msg = gfc_extract_int (e, &ts->kind);
if (msg != NULL)
{
- gfc_error (msg);
+ gfc_error ("%s", msg);
m = MATCH_ERROR;
goto no_match;
}
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/intrinsic.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/intrinsic.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/intrinsic.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/intrinsic.c Wed Feb 18 02:45:51 2009
@@ -126,7 +126,7 @@
sprintf (name, "__convert_%c%d_%c%d", gfc_type_letter (from->type),
from->kind, gfc_type_letter (to->type), to->kind);
- return gfc_get_string (name);
+ return gfc_get_string ("%s", name);
}
@@ -249,11 +249,11 @@
break;
case SZ_NOTHING:
- next_sym->name = gfc_get_string (name);
+ next_sym->name = gfc_get_string ("%s", name);
strcpy (buf, "_gfortran_");
strcat (buf, name);
- next_sym->lib_name = gfc_get_string (buf);
+ next_sym->lib_name = gfc_get_string ("%s", buf);
next_sym->elemental = elemental;
next_sym->actual_ok = actual_ok;
@@ -871,7 +871,7 @@
case SZ_NOTHING:
next_sym[0] = next_sym[-1];
- next_sym->name = gfc_get_string (name);
+ next_sym->name = gfc_get_string ("%s", name);
next_sym++;
break;
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/match.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/match.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/match.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/match.c Wed Feb 18 02:45:51 2009
@@ -212,7 +212,7 @@
if (p != NULL)
{
- gfc_error (p);
+ gfc_error ("%s", p);
m = MATCH_ERROR;
}
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/matchexp.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/matchexp.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/matchexp.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/matchexp.c Wed Feb 18 02:45:51 2009
@@ -198,7 +198,7 @@
return MATCH_YES;
syntax:
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
return MATCH_ERROR;
}
@@ -493,7 +493,7 @@
m = match_ext_add_operand (&e);
if (m == MATCH_NO)
{
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
m = MATCH_ERROR;
}
}
@@ -532,7 +532,7 @@
m = match_ext_add_operand (&e);
if (m == MATCH_NO)
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
if (m != MATCH_YES)
{
gfc_free_expr (all);
@@ -583,7 +583,7 @@
m = match_level_2 (&e);
if (m == MATCH_NO)
{
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
gfc_free_expr (all);
}
if (m != MATCH_YES)
@@ -641,7 +641,7 @@
m = match_level_3 (&right);
if (m == MATCH_NO)
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
if (m != MATCH_YES)
{
gfc_free_expr (left);
@@ -744,7 +744,7 @@
m = match_and_operand (&e);
if (m == MATCH_NO)
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
if (m != MATCH_YES)
{
gfc_free_expr (all);
@@ -787,7 +787,7 @@
m = match_or_operand (&e);
if (m == MATCH_NO)
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
if (m != MATCH_YES)
{
gfc_free_expr (all);
@@ -841,7 +841,7 @@
m = match_equiv_operand (&e);
if (m == MATCH_NO)
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
if (m != MATCH_YES)
{
gfc_free_expr (all);
@@ -900,7 +900,7 @@
m = match_level_5 (&e);
if (m == MATCH_NO)
- gfc_error (expression_syntax);
+ gfc_error ("%s", expression_syntax);
if (m != MATCH_YES)
{
gfc_free_expr (all);
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/module.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/module.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/module.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/module.c Wed Feb 18 02:45:51 2009
@@ -716,9 +716,9 @@
gfc_symbol sym;
int c;
- sym.name = gfc_get_string (name);
+ sym.name = gfc_get_string ("%s", name);
if (module != NULL)
- sym.module = gfc_get_string (module);
+ sym.module = gfc_get_string ("%s", module);
else
sym.module = NULL;
t.sym = &sym;
@@ -1404,7 +1404,7 @@
else
{
require_atom (ATOM_STRING);
- *stringp = atom_string[0] == '\0' ? NULL : gfc_get_string (atom_string);
+ *stringp = atom_string[0] == '\0' ? NULL : gfc_get_string ("%s", atom_string);
gfc_free (atom_string);
}
}
@@ -2617,7 +2617,7 @@
else
{
require_atom (ATOM_STRING);
- e->value.function.name = gfc_get_string (atom_string);
+ e->value.function.name = gfc_get_string ("%s", atom_string);
gfc_free (atom_string);
mio_integer (&flag);
@@ -3198,7 +3198,7 @@
}
sym = gfc_new_symbol (p->u.rsym.true_name, ns);
- sym->module = gfc_get_string (p->u.rsym.module);
+ sym->module = gfc_get_string ("%s", p->u.rsym.module);
associate_integer_pointer (p, sym);
}
@@ -3420,7 +3420,7 @@
gfc_new_symbol (info->u.rsym.true_name,
gfc_current_ns);
- sym->module = gfc_get_string (info->u.rsym.module);
+ sym->module = gfc_get_string ("%s", info->u.rsym.module);
}
st->n.sym = sym;
@@ -3656,7 +3656,7 @@
sym = st->n.sym;
if (sym->module == NULL)
- sym->module = gfc_get_string (module_name);
+ sym->module = gfc_get_string ("%s", module_name);
if (sym->attr.flavor == FL_PROCEDURE && sym->attr.generic
&& !sym->attr.subroutine && !sym->attr.function)
@@ -3735,7 +3735,7 @@
return;
if (sym->module == NULL)
- sym->module = gfc_get_string (module_name);
+ sym->module = gfc_get_string ("%s", module_name);
mio_symbol_interface (&sym->name, &sym->module, &sym->generic);
}
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/primary.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/primary.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/primary.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/primary.c Wed Feb 18 02:45:51 2009
@@ -254,7 +254,7 @@
msg = gfc_extract_int (e, &num);
if (msg != NULL)
{
- gfc_error (msg);
+ gfc_error ("%s", msg);
goto cleanup;
}
if (num == 0)
@@ -925,7 +925,7 @@
q = gfc_extract_int (sym->value, &kind);
if (q != NULL)
{
- gfc_error (q);
+ gfc_error ("%s", q);
return MATCH_ERROR;
}
}
@@ -1432,7 +1432,7 @@
}
}
- actual->name = gfc_get_string (name);
+ actual->name = gfc_get_string ("%s", name);
return MATCH_YES;
cleanup:
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/symbol.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/symbol.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/symbol.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/fortran/symbol.c Wed Feb 18 02:45:51 2009
@@ -1327,7 +1327,7 @@
else
tail->next = p;
- p->name = gfc_get_string (name);
+ p->name = gfc_get_string ("%s", name);
p->loc = gfc_current_locus;
*component = p;
@@ -1788,7 +1788,7 @@
gfc_symtree *st;
st = gfc_getmem (sizeof (gfc_symtree));
- st->name = gfc_get_string (name);
+ st->name = gfc_get_string ("%s", name);
gfc_insert_bbt (root, st, compare_symtree);
return st;
@@ -1804,7 +1804,7 @@
st0 = gfc_find_symtree (*root, name);
- st.name = gfc_get_string (name);
+ st.name = gfc_get_string ("%s", name);
gfc_delete_bbt (root, &st, compare_symtree);
gfc_free (st0);
@@ -1849,7 +1849,7 @@
st = gfc_new_symtree (&gfc_current_ns->uop_root, name);
uop = st->n.uop = gfc_getmem (sizeof (gfc_user_op));
- uop->name = gfc_get_string (name);
+ uop->name = gfc_get_string ("%s", name);
uop->access = ACCESS_UNKNOWN;
uop->ns = gfc_current_ns;
@@ -1919,7 +1919,7 @@
if (strlen (name) > GFC_MAX_SYMBOL_LEN)
gfc_internal_error ("new_symbol(): Symbol name too long");
- p->name = gfc_get_string (name);
+ p->name = gfc_get_string ("%s", name);
return p;
}
@@ -2702,7 +2702,7 @@
s = gfc_getmem (sizeof (gfc_gsymbol));
s->type = GSYM_UNKNOWN;
- s->name = gfc_get_string (name);
+ s->name = gfc_get_string ("%s", name);
gfc_insert_bbt (&gfc_gsym_root, s, gsym_compare);
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/stub-c.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/stub-c.c?rev=64912&r1=64911&r2=64912&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/stub-c.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/stub-c.c Wed Feb 18 02:45:51 2009
@@ -40,6 +40,7 @@
tree iasm_addr (tree e ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
@@ -49,6 +50,7 @@
tree v2 ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
@@ -80,6 +82,7 @@
bool iasm_is_pseudo (const char *opcode ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return false;
}
@@ -105,6 +108,7 @@
tree rhs ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
@@ -113,6 +117,7 @@
tree decl_constant_value (tree decl ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
@@ -122,6 +127,7 @@
tree params ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
@@ -130,6 +136,7 @@
tree build_stmt (enum tree_code code ATTRIBUTE_UNUSED, ...)
{
gcc_assert(0);
+ return NULL;
}
@@ -138,6 +145,7 @@
tree lookup_name (tree name ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
@@ -148,6 +156,7 @@
tree intop ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
@@ -168,6 +177,7 @@
size_t * numUniChars ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return false;
}
tree create_init_utf16_var (const unsigned char *, size_t,
@@ -179,4 +189,5 @@
size_t * numUniChars ATTRIBUTE_UNUSED)
{
gcc_assert(0);
+ return NULL;
}
More information about the llvm-commits
mailing list