Source

libyaml / src / reader.c

Diff from to

File src/reader.c

 
         while (parser->raw_buffer.pointer != parser->raw_buffer.last)
         {
-            unsigned int value, value2;
+            unsigned int value = 0, value2 = 0;
             int incomplete = 0;
             unsigned char octet;
-            unsigned int width;
+            unsigned int width = 0;
             int k, low, high;
             int raw_unread = parser->raw_buffer.last - parser->raw_buffer.pointer;
 
 
                         /* Get the next character. */
 
-                        unsigned int value2 = parser->raw_buffer.pointer[low+2]
+                        value2 = parser->raw_buffer.pointer[low+2]
                             + (parser->raw_buffer.pointer[high+2] << 8);
 
                         /* Check for a low surrogate area. */
                     }
 
                     break;
+
+                default:
+                    assert(1);      /* Impossible. */
             }
 
             /* Check if the raw buffer contains enough bytes to form a character. */