This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, fortran]: remove unused functions
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 17 Oct 2007 09:56:47 +1000
- Subject: [PATCH, fortran]: remove unused functions
Building gcc for spu-elf (with make -s, as I tend to do), I noticed
warnings about functions that are defined but never used. OK for the
trunk?
2007-10-17 Ben Elliston <bje@au.ibm.com>
* runtime/environ.c (init_choice): Remove unused function.
(show_choice): Likewise.
Index: runtime/environ.c
===================================================================
--- runtime/environ.c (revision 129392)
+++ runtime/environ.c (working copy)
@@ -307,49 +307,6 @@ static const choice signal_choices[] =
};
-static void
-init_choice (variable * v, const choice * c)
-{
- char *p;
-
- p = getenv (v->name);
- if (p == NULL)
- goto set_default;
-
- for (; c->name; c++)
- if (strcasecmp (c->name, p) == 0)
- break;
-
- if (c->name == NULL)
- {
- v->bad = 1;
- goto set_default;
- }
-
- *v->var = c->value;
- return;
-
- set_default:
- *v->var = v->value;
-}
-
-
-static void
-show_choice (variable * v, const choice * c)
-{
- st_printf ("%s ", var_source (v));
-
- for (; c->name; c++)
- if (c->value == *v->var)
- break;
-
- if (c->name)
- st_printf ("%s\n", c->name);
- else
- st_printf ("(Unknown)\n");
-}
-
-
static variable variable_table[] = {
{"GFORTRAN_STDIN_UNIT", GFC_STDIN_UNIT_NUMBER, &options.stdin_unit,
init_integer, show_integer,