This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] Fix compiler warnings in fortran/io.c
- From: Roger Sayle <roger at eyesopen dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 26 May 2004 17:57:22 -0600 (MDT)
- Subject: [Committed] Fix compiler warnings in fortran/io.c
The following patch silences two compiler warnings on line 34 of
gfortran's io.c. The initializer for format_asterisk contains two
many elements for a "locus" which is defined as:
typedef struct
{
char *nextc;
gfc_linebuf *lb;
} locus;
in the initialization of format_asterisk of type gfc_st_label:
typedef struct gfc_st_label
{
int value;
gfc_sl_type defined, referenced;
struct gfc_expr *format;
tree backend_decl;
locus where;
struct gfc_st_label *prev, *next;
} gfc_st_label;
The following patch has been tested on i686-pc-linux-gnu by a complete
"make bootstrap" including gfortran. Committed to mainline CVS as
obvious.
2004-05-26 Roger Sayle <roger@eyesopen.com>
* io.c (format_asterisk): Silence compiler warnings by correcting
the number of elements of a "locus" initializer.
Index: io.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/io.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 io.c
*** io.c 21 May 2004 21:37:20 -0000 1.6
--- io.c 26 May 2004 23:40:46 -0000
*************** Software Foundation, 59 Temple Place - S
*** 31,37 ****
gfc_st_label format_asterisk =
{ -1, ST_LABEL_FORMAT, ST_LABEL_FORMAT, NULL, 0,
! {NULL, 0, NULL, NULL}, NULL, NULL};
typedef struct
{
--- 31,37 ----
gfc_st_label format_asterisk =
{ -1, ST_LABEL_FORMAT, ST_LABEL_FORMAT, NULL, 0,
! {NULL, NULL}, NULL, NULL};
typedef struct
{
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833