Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(592)

Issue 4547055: Turn on -Wall in common.gypi, and clean up all warnings (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by Stephen White
Modified:
13 years, 6 months ago
Reviewers:
reed, bsalomon, reed1
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

The plain Makefile was using -Wall, but the gyp build wasn't. This CL turns on -Wall -Wextra and -Wno-unused in common.gypi. This revealed a lot of warnings (and some actual bugs), all of which I fixed here. This is pretty mindless stuff for the most part (order of intialization, missing initializers, && within ||, etc), but will allow us to build cleanly with -Wall and -Wextra (and -Werror, if we so choose). I put defaults into switches that were missing cases. I could put in the actual missing enums instead if that's desired. I could also assert on missing enums instead of break, if that's desired. I wasn't sure how to test the stuff in "animator", so that should be looked at a bit more closely.

Patch Set 1 #

Patch Set 2 : Remove some extra .gyp changes #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -117 lines) Patch
gpu/include/GrSamplerState.h View 1 chunk +1 line, -1 line 0 comments Download
gpu/src/GrGpuGLFixed.h View 1 chunk +1 line, -1 line 0 comments Download
gpu/src/GrStencil.cpp View 1 chunk +8 lines, -1 line 0 comments Download
gpu/src/GrTesselatedPathRenderer.cpp View 4 chunks +3 lines, -4 lines 2 comments Download
gpu/src/gr_unittests.cpp View 1 chunk +1 line, -1 line 0 comments Download
gyp/common.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
samplecode/ClockFaceView.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleAARects.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleAll.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
samplecode/SampleArc.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleAvoid.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleBitmapRect.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleComplexClip.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleDitherBitmap.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleDrawLooper.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleEffects.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleLayers.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleLineClipper.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleMeasure.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SamplePatch.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
samplecode/SamplePath.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
samplecode/SamplePolyToPoly.cpp View 2 chunks +12 lines, -8 lines 0 comments Download
samplecode/SampleRegion.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleShaderText.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleSlides.cpp View 3 chunks +4 lines, -3 lines 0 comments Download
samplecode/SampleText.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleTextEffects.cpp View 1 chunk +1 line, -1 line 0 comments Download
samplecode/SampleTiling.cpp View 4 chunks +8 lines, -8 lines 0 comments Download
samplecode/SampleVertices.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
src/animator/SkDisplayApply.cpp View 3 chunks +4 lines, -4 lines 1 comment Download
src/animator/SkDisplayXMLParser.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
src/animator/SkDump.cpp View 1 chunk +1 line, -1 line 0 comments Download
src/animator/SkScript.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
src/animator/SkScriptDecompile.cpp View 4 chunks +6 lines, -4 lines 0 comments Download
src/animator/SkScriptRuntime.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
src/animator/SkScriptTokenizer.cpp View 7 chunks +43 lines, -42 lines 0 comments Download
src/svg/SkSVGParser.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
src/utils/unix/SkOSWindow_Unix.cpp View 1 chunk +1 line, -1 line 0 comments Download
src/views/SkBorderView.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
src/views/SkView.cpp View 1 chunk +1 line, -1 line 0 comments Download
src/views/SkWidgetViews.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6
Stephen White
13 years, 6 months ago (2011-05-19 18:58:01 UTC) #1
Stephen White
Remove some extra .gyp changes
13 years, 6 months ago (2011-05-19 19:00:43 UTC) #2
bsalomon
LGTM On 2011/05/19 19:00:43, Stephen White wrote: > Remove some extra .gyp changes
13 years, 6 months ago (2011-05-19 19:18:52 UTC) #3
Stephen White
Landed as r1386, closing.
13 years, 6 months ago (2011-05-20 14:02:50 UTC) #4
reed1
LGTM http://codereview.appspot.com/4547055/diff/11003/gpu/src/GrTesselatedPathRenderer.cpp File gpu/src/GrTesselatedPathRenderer.cpp (left): http://codereview.appspot.com/4547055/diff/11003/gpu/src/GrTesselatedPathRenderer.cpp#oldcode134 gpu/src/GrTesselatedPathRenderer.cpp:134: bool colorWritesWereDisabled = target->isColorWriteDisabled(); Is this removal also ...
13 years, 6 months ago (2011-05-20 21:38:19 UTC) #5
Stephen White
13 years, 6 months ago (2011-05-20 21:53:58 UTC) #6
http://codereview.appspot.com/4547055/diff/11003/gpu/src/GrTesselatedPathRend...
File gpu/src/GrTesselatedPathRenderer.cpp (left):

http://codereview.appspot.com/4547055/diff/11003/gpu/src/GrTesselatedPathRend...
gpu/src/GrTesselatedPathRenderer.cpp:134: bool colorWritesWereDisabled =
target->isColorWriteDisabled();
On 2011/05/20 21:38:19, reed1 wrote:
> Is this removal also just for warnings?

Cargo cult programming.  This code was copied in from GrDefaultPathRenderer, but
isn't needed anymore, which the warning tipped me off too.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b