gnash-dev
[Top][All Lists]
Advanced

[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.

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
address@hidden
https://lists.gnu.org/mailman/listinfo/gnash-dev




reply via email to

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