[PATCH 08/12] utils: initialize variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



clang is too stupid to figure out that this depends on the bool.

Fixes -Wconditional-uninitialized

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

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];
 
-- 
2.25.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux