Turn on -Wall -Wextra on Mac, and fix all the warnings that crop up for /usr/bin/g++ and Clang 3.3.

BUG=
R=bungeman@google.com

Author: mtklein@google.com

Review URL: https://chromiumcodereview.appspot.com/19569012

git-svn-id: http://skia.googlecode.com/svn/trunk@10255 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2013-07-23 11:13:56 +00:00
parent 6ae6383f56
commit faa5ae456d
8 changed files with 22 additions and 23 deletions

View File

@ -72,7 +72,7 @@ protected:
SkPath::Verb verb;
SkPoint pts[4];
while ((verb = iter.next(pts)) != SkPath::kDone_Verb);
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { }
}
} else {
for (int i = 0; i < N; ++i) {
@ -80,7 +80,7 @@ protected:
SkPath::Verb verb;
SkPoint pts[4];
while ((verb = iter.next(pts)) != SkPath::kDone_Verb);
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { }
}
}
}

View File

@ -302,6 +302,9 @@
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'-Werror',
'-Wall',
'-Wextra',
'-Wno-unused-parameter',
],
},
}],

View File

@ -45,9 +45,6 @@ private:
SkConvolutionFilter1D* output,
SkConvolutionProcs* convolveProcs);
// Subset of scaled destination bitmap to compute.
SkIRect fOutBounds;
SkConvolutionFilter1D fXFilter;
SkConvolutionFilter1D fYFilter;
};
@ -56,8 +53,7 @@ SkResizeFilter::SkResizeFilter(SkBitmapScaler::ResizeMethod method,
int srcFullWidth, int srcFullHeight,
int destWidth, int destHeight,
const SkIRect& destSubset,
SkConvolutionProcs* convolveProcs)
: fOutBounds(destSubset) {
SkConvolutionProcs* convolveProcs) {
// method will only ever refer to an "algorithm method".
SkASSERT((SkBitmapScaler::RESIZE_FIRST_ALGORITHM_METHOD <= method) &&

View File

@ -121,7 +121,7 @@ SkPicture::SkPicture() {
fWidth = fHeight = 0;
}
SkPicture::SkPicture(const SkPicture& src) {
SkPicture::SkPicture(const SkPicture& src) : INHERITED() {
fWidth = src.fWidth;
fHeight = src.fHeight;
fRecord = NULL;

View File

@ -41,7 +41,7 @@ public:
/**
* Copies another draw state.
**/
GrDrawState(const GrDrawState& state) {
GrDrawState(const GrDrawState& state) : INHERITED() {
GR_DEBUGCODE(fBlockEffectRemovalCnt = 0;)
*this = state;
}

View File

@ -19,7 +19,7 @@ public:
SK_DECLARE_INST_COUNT(Caps)
GrDrawTargetCaps() { this->reset(); }
GrDrawTargetCaps(const GrDrawTargetCaps& other) { *this = other; }
GrDrawTargetCaps(const GrDrawTargetCaps& other) : INHERITED() { *this = other; }
GrDrawTargetCaps& operator= (const GrDrawTargetCaps&);
virtual void reset();

View File

@ -36,7 +36,7 @@ SkLayer::SkLayer() {
#endif
}
SkLayer::SkLayer(const SkLayer& src) {
SkLayer::SkLayer(const SkLayer& src) : INHERITED() {
fParent = NULL;
m_opacity = src.m_opacity;
m_size = src.m_size;

View File

@ -278,7 +278,7 @@
return cell;
}
- (NSCell*)createTextField:(NSString*)placeHolder; {
- (NSCell*)createTextField:(NSString*)placeHolder {
SkTextFieldCell* cell = [[[SkTextFieldCell alloc] init] autorelease];
[cell setEditable:YES];
[cell setStringValue:@""];