diff mbox series

Silecne bogus -Wmaybe-uninitialized warning

Message ID 20191002144436.aub7amzau6dhqn4b@kam.mff.cuni.cz
State New
Headers show
Series Silecne bogus -Wmaybe-uninitialized warning | expand

Commit Message

Jan Hubicka Oct. 2, 2019, 2:44 p.m. UTC
Hi,
this patch silences -Wmaybe-uninitialized warning when GCC is built
with -finline-functions (which I am working to make part of -O2).

Bootstrapped/regtested x86_64-linux, comitted as obvious.
Honza
	* module.c (load_commons): Initialize flags to 0 to silecne
	-Wmaybe-uninitialized warning.
	(read_module): Likewise for n and comp_name.
diff mbox series

Patch

Index: module.c
===================================================================
--- module.c	(revision 276441)
+++ module.c	(working copy)
@@ -4745,7 +4745,7 @@  load_commons (void)
 
   while (peek_atom () != ATOM_RPAREN)
     {
-      int flags;
+      int flags = 0;
       char* label;
       mio_lparen ();
       mio_internal_string (name);
@@ -5243,8 +5243,8 @@  read_module (void)
 	  for (c = sym->components; c; c = c->next)
 	    {
 	      pointer_info *p;
-	      const char *comp_name;
-	      int n;
+	      const char *comp_name = NULL;
+	      int n = 0;
 
 	      mio_lparen (); /* component opening.  */
 	      mio_integer (&n);