Bug 43412

Summary: Fix warning in WebCore/rendering/RenderBoxModelObject.cpp
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: bdakin, mitz
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 43191    
Description Flags
proposed fix none

Description Csaba Osztrogonác 2010-08-03 04:40:08 PDT
gcc warning:
..\..\..\WebCore\rendering\RenderBoxModelObject.cpp: In member function 'void WebCore::RenderBoxModelObject::clipBorderSidePolygon(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntSize&, const WebCore::IntSize&, const WebCore::IntSize&, const WebCore::IntSize&, WebCore::BoxSide, bool, bool, const WebCore::RenderStyle*)':
..\..\..\WebCore\rendering\RenderBoxModelObject.cpp:1529:62: warning: operation on 'firstQuad[2]' may be undefined

This warning introduced in http://trac.webkit.org/changeset/63864 :

1528 firstQuad[2] = side == BSTop || side == BSBottom ? FloatPoint(quad[3].x(), quad[2].y())
1529	        : firstQuad[2] = FloatPoint(quad[2].x(), quad[3].y());

Assignment in the false case of ternary condition is useless,
and evaluating of undefined firstQuad[2] cause this warning.
Comment 1 Csaba Osztrogonác 2010-08-03 04:41:24 PDT
Created attachment 63324 [details]
proposed fix
Comment 2 Antonio Gomes 2010-08-03 06:03:40 PDT
Comment on attachment 63324 [details]
proposed fix

Comment 3 Csaba Osztrogonác 2010-08-03 06:45:04 PDT
Comment on attachment 63324 [details]
proposed fix

Clearing flags on attachment: 63324

Committed r64553: <http://trac.webkit.org/changeset/64553>
Comment 4 Csaba Osztrogonác 2010-08-03 06:45:12 PDT
All reviewed patches have been landed.  Closing bug.