Patchwork : Prevent uninitalized warning in gengtype-state.c

login
register
mail settings
Submitter Uros Bizjak
Date Nov. 25, 2010, 9:51 p.m.
Message ID <AANLkTikqYpn-rYZDmzUw=GbvZJpNfMi-pz8m8iPd2+RD@mail.gmail.com>
Download mbox | patch
Permalink /patch/73123/
State New
Headers show

Comments

Uros Bizjak - Nov. 25, 2010, 9:51 p.m.
Hello!

Profiledbootstrap breaks in gengtype-state.c, claiming that "previous"
variable in read_state_structures may be uninitialized.

I have committed attached patch to fix the failure.

2010-11-25  Uros Bizjak  <ubizjak@gmail.com>

	* gengtype-state.c (read_state_structures): Initialize "previous".

Tested on x86_64-pc-linux-gnu {,-m32} with profiledbootstrap.
Committed to SVN mainline.

Uros.

Patch

Index: gengtype-state.c
===================================================================
--- gengtype-state.c	(revision 167150)
+++ gengtype-state.c	(working copy)
@@ -2085,7 +2085,7 @@  static void
 read_state_structures (type_p *structures)
 {
   type_p head = NULL;
-  type_p previous;
+  type_p previous = NULL;
   type_p tmp;
   int nbstruct = 0, countstruct = 0;
   struct state_token_st *t0 = peek_state_token (0);