bitreader: Fix uninitialized variable compiler warnings
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 3 Oct 2010 21:41:26 +0000 (23:41 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 3 Oct 2010 21:41:26 +0000 (23:41 +0200)
gcc doesn't notice that the check assertion macros will abort
further execution of the tests.

tests/check/libs/bitreader.c

index c3655c3895aebfdd64c6aaef0c7ce0d626b62c81..ac2e3cddce468bb3b0adfe1e21ed56791d2c2712 100644 (file)
@@ -45,7 +45,7 @@ GST_START_TEST (test_initialization)
   GstBuffer *buffer = gst_buffer_new ();
   GstBitReader reader = GST_BIT_READER_INIT (data, 4);
   GstBitReader *reader2;
-  guint8 x;
+  guint8 x = 0;
 
   GST_BUFFER_DATA (buffer) = data;
   GST_BUFFER_SIZE (buffer) = 4;
@@ -197,7 +197,7 @@ GST_START_TEST (test_position_tracking)
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
   };
   GstBitReader reader = GST_BIT_READER_INIT (data, 16);
-  guint8 a;
+  guint8 a = 0;
 
   fail_unless_equals_int (gst_bit_reader_get_pos (&reader), 0);
   fail_unless_equals_int (gst_bit_reader_get_remaining (&reader), 16 * 8);