Bug 169028

Summary: [GTK] Fix problems found by Coverity scan in platform's keyboard and mouse events
Product: WebKit Reporter: Tomas Popela <tpopela>
Component: WebKitGTKAssignee: Tomas Popela <tpopela>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 104114    
Attachments:
Description Flags
Patch none

Tomas Popela
Reported 2017-03-01 03:50:38 PST
18. webkitgtk-2.14.5/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp:116: uninit_member: Non-static class member "m_modifierFlags" is not initialized in this constructor nor in any functions that it calls. # 114| else if (motion->state & GDK_BUTTON3_MASK) # 115| m_button = RightButton; # 116|-> } # 117| } and 12. webkitgtk-2.14.5/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp:82: uninit_member: Non-static class member "m_modifierFlags" is not initialized in this constructor nor in any functions that it calls. # 80| ASSERT_NOT_REACHED(); # 81| }; # 82|-> } # 83| # 84| PlatformMouseEvent::PlatformMouseEvent(GdkEventMotion* motion) and 6. webkitgtk-2.14.5/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp:590: uninit_member: Non-static class member "m_handledByInputMethod" is not initialized in this constructor nor in any functions that it calls. # 588| if (compositionResults.compositionUpdated()) # 589| m_windowsVirtualKeyCode = VK_PROCESSKEY; # 590|-> } # 591| # 592| void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode)
Attachments
Patch (2.75 KB, patch)
2017-03-01 03:56 PST, Tomas Popela
no flags
Tomas Popela
Comment 1 2017-03-01 03:56:49 PST
Tomas Popela
Comment 2 2017-03-01 06:18:35 PST
Comment on attachment 303060 [details] Patch Clearing flags on attachment: 303060 Committed r213218: <http://trac.webkit.org/changeset/213218>
Tomas Popela
Comment 3 2017-03-01 06:18:43 PST
All reviewed patches have been landed. Closing bug.
Tomas Popela
Comment 4 2017-03-01 06:41:24 PST
The original commit introduced a compiler error that I fixed in http://trac.webkit.org/changeset/213220: [8/67] Building CXX object Source/WebCore/CMakeFiles/WebCorePlatformGTK2.dir/platform/gtk/PlatformKeyboardEventGtk.cpp.o In file included from ../../Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp:31:0: ../../Source/WebCore/platform/PlatformKeyboardEvent.h: In constructor ‘WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent(GdkEventKey*, const WebCore::CompositionResults&)’: ../../Source/WebCore/platform/PlatformKeyboardEvent.h:186:14: warning: ‘WebCore::PlatformKeyboardEvent::m_autoRepeat’ will be initialized after [-Wreorder] bool m_autoRepeat; ^~~~~~~~~~~~ ../../Source/WebCore/platform/PlatformKeyboardEvent.h:179:14: warning: ‘bool WebCore::PlatformKeyboardEvent::m_handledByInputMethod’ [-Wreorder] bool m_handledByInputMethod; ^~~~~~~~~~~~~~~~~~~~~~ ../../Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp:1261:1: warning: when initialized here [-Wreorder] PlatformKeyboardEvent::PlatformKeyboardEvent(GdkEventKey* event, const CompositionResults& compositionResults) ^~~~~~~~~~~~~~~~~~~~~
Note You need to log in before you can comment on or make changes to this bug.