Bug 43412 - Fix warning in WebCore/rendering/RenderBoxModelObject.cpp
Summary: Fix warning in WebCore/rendering/RenderBoxModelObject.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 43191
  Show dependency treegraph
 
Reported: 2010-08-03 04:40 PDT by Csaba Osztrogonác
Modified: 2010-08-03 06:45 PDT (History)
2 users (show)

See Also:


Attachments
proposed fix (1.26 KB, patch)
2010-08-03 04:41 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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

r=me
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.