gnash-dev
[Top][All Lists]
Advanced

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

[Gnash-dev] A handfull missing break statements?


From: Petter Reinholdtsen
Subject: [Gnash-dev] A handfull missing break statements?
Date: Sat, 19 Apr 2014 15:59:19 +0200
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]