]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/msgr/test_async_driver.cc: fix UNINIT
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 22 Feb 2016 14:44:05 +0000 (15:44 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:44:57 +0000 (14:44 -0500)
Fix for:

CID 1254379 (#1 of 1): Uninitialized scalar variable (UNINIT)
 uninit_use_in_call: Using uninitialized value c when calling write.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/msgr/test_async_driver.cc

index ec3bbd7e53b3f889d5716873d12d3b3aa694ad74..8f4e5c4e2637147e8d08598e41c979d400a53a0d 100644 (file)
@@ -115,7 +115,7 @@ TEST_P(EventDriverTest, PipeTest) {
   r = driver->event_wait(fired_events, &tv);
   ASSERT_EQ(r, 0);
 
-  char c;
+  char c = 'A';
   r = write(fds[1], &c, sizeof(c));
   ASSERT_EQ(r, 1);
   r = driver->event_wait(fired_events, &tv);