dib0700_core.c: uninitialized variable warning, not sure how to fix

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

 



The daily build produces this compiler warning:

dib0700_core.c: In function 'dib0700_rc_urb_completion':
dib0700_core.c:787:2: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
  rc_keydown(d->rc_dev, protocol, keycode, toggle);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is indeed correct as there is a path in that function where protocol is
uninitialized, but I lack the knowledge how this should be fixed.

Mauro, can you take a look?

It goes wrong in the switch in case RC_BIT_NEC if the first 'if' is true.
Note that keycode is also uninitialized, but it is declared as uninitialized_var(),
although why you would want to do that instead of just initializing it to 0 or
something like that is a mystery to me.

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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