RESOLVED FIXED 44466
Fix gcc warning introduced in 65731
https://bugs.webkit.org/show_bug.cgi?id=44466
Summary Fix gcc warning introduced in 65731
Csaba Osztrogonác
Reported 2010-08-23 16:29:44 PDT
This warning introduced in http://trac.webkit.org/changeset/65731 gcc warning: ../../../WebCore/inspector/InspectorDOMAgent.cpp:1064: warning: control reaches end of non-void function 1055 bool InspectorDOMAgent::pauseOnBreakpoint() 1056 { 1057 #if ENABLE(JAVASCRIPT_DEBUGGER) 1058 s_domAgentOnBreakpoint = this; 1059 ScriptDebugServer::shared().breakProgram(); 1060 bool deleted = !s_domAgentOnBreakpoint; 1061 s_domAgentOnBreakpoint = 0; 1062 return !deleted; 1063 #endif 1064 } InspectorDOMAgent::pauseOnBreakpoint() should return a default value when ENABLE(JAVASCRIPT_DEBUGGER) is false. Could you fix it, please?
Attachments
Fix both warnings. (1.75 KB, patch)
2010-08-24 01:35 PDT, Pavel Podivilov
no flags
Fix both warnings. (1.46 KB, patch)
2010-08-24 01:36 PDT, Pavel Podivilov
no flags
Pavel Podivilov
Comment 1 2010-08-24 01:35:27 PDT
Created attachment 65232 [details] Fix both warnings.
Pavel Podivilov
Comment 2 2010-08-24 01:36:17 PDT
Created attachment 65233 [details] Fix both warnings.
Csaba Osztrogonác
Comment 3 2010-08-24 01:55:57 PDT
- mask = mask | (mask >> domBreakpointDerivedTypeShift) & ((1 << domBreakpointDerivedTypeShift) - 1); + mask = (mask | (mask >> domBreakpointDerivedTypeShift)) & ((1 << domBreakpointDerivedTypeShift) - 1); I don't understand what should this code do, but adding parantheses like this, will change the behaviour of the code. Which one is wrong? The original or the modified? a | b & c is equal to a | (b & c) , because & has higher precedence than |
Yury Semikhatsky
Comment 4 2010-08-24 01:59:10 PDT
(In reply to comment #3) > - mask = mask | (mask >> domBreakpointDerivedTypeShift) & ((1 << domBreakpointDerivedTypeShift) - 1); > + mask = (mask | (mask >> domBreakpointDerivedTypeShift)) & ((1 << domBreakpointDerivedTypeShift) - 1); > > I don't understand what should this code do, but adding > parantheses like this, will change the behaviour of the code. > Which one is wrong? The original or the modified? > > a | b & c is equal to a | (b & c) , because & has higher precedence than | The latter version is correct, original one had a bug since we want new mask to fit into domBreakpointDerivedTypeShift bits. Thanks for pointing this out.
Csaba Osztrogonác
Comment 5 2010-08-24 02:01:43 PDT
*** Bug 44468 has been marked as a duplicate of this bug. ***
Csaba Osztrogonác
Comment 6 2010-08-24 04:02:16 PDT
Note You need to log in before you can comment on or make changes to this bug.