[Top][All Lists]

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

Re: [Gnash-dev] A handfull missing break statements?

From: Bastiaan Jacques
Subject: Re: [Gnash-dev] A handfull missing break statements?
Date: Sat, 19 Apr 2014 16:01:56 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

Looks like the correct fix to me, although I would prefer coverity
report numbers in the commit message rather than in the code itself.


On Sat, 19 Apr 2014, Petter Reinholdtsen wrote:


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;
            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
                log_unimpl(_("Relative move event %d from Input Event Device"),

Happy hacking
Petter Reinholdtsen

Gnash-dev mailing list

reply via email to

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