Looks like the correct fix to me, although I would prefer coverity
report numbers in the commit message rather than in the code itself.
Bastiaan
On Sat, 19 Apr 2014, Petter Reinholdtsen wrote:
Hi.
The Coverity check of gnash show eight cases of missing break statements
in switch blocks. The following patch fix half of them, and I wonder if
this is the correct fix.
I am not quite sure what the originl code tried to do, given that a
REL_HWHEEL even would print four log_debug() lines and one log_unimpl()
line (and similar for the others), but I suspect it is enough to print
one log_unimpl() line for each unhandled event type.
Do you agree?
diff --git a/libdevice/events/EventDevice.cpp b/libdevice/events/EventDevice.cpp
index 5351dcf..e52dfd1 100644
--- a/libdevice/events/EventDevice.cpp
+++ b/libdevice/events/EventDevice.cpp
@@ -409,13 +409,17 @@ EventDevice::check()
_input_data.rz = ev-value;
break;
case REL_HWHEEL:
-log_debug(_(REL_HWHEEL: %d), ev-value);
+log_unimpl(_(REL_HWHEEL: %d), ev-value);
+break; // CID 149162
case REL_DIAL:
-log_debug(_(REL_DIAL: %d), ev-value);
+log_unimpl(_(REL_DIAL: %d), ev-value);
+break; // CID 149163
case REL_WHEEL:
-log_debug(_(REL_WHEEL: %d), ev-value);
+log_unimpl(_(REL_WHEEL: %d), ev-value);
+break; // CID 149164
case REL_MISC:
-log_debug(_(REL_MISC: %d), ev-value);
+log_unimpl(_(REL_MISC: %d), ev-value);
+break; // CID 149165
default:
log_unimpl(_(Relative move event %d from Input Event Device),
ev-value);
--
Happy hacking
Petter Reinholdtsen
___
Gnash-dev mailing list
Gnash-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnash-dev
___
Gnash-dev mailing list
Gnash-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnash-dev