diff mbox series

[08/12] utils: initialize variable

Message ID 20200422003735.3891-8-rosenp@gmail.com
State New
Headers show
Series None | expand

Commit Message

Rosen Penev April 22, 2020, 12:37 a.m. UTC
clang is too stupid to figure out that this depends on the bool.

Fixes -Wconditional-uninitialized

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/cec-ctl/cec-ctl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 3acfe0b2..f4133494 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -2091,7 +2091,7 @@  int main(int argc, char **argv)
 			};
 			char *value, *endptr, *subs = optarg;
 			bool have_cmd = false;
-			__u8 cmd;
+			__u8 cmd = 0;
 			__u8 size = 0;
 			__u8 bytes[14];