Fix warnings

Review URL: http://codereview.appspot.com/5433054/


git-svn-id: http://skia.googlecode.com/svn/trunk@2741 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-11-23 15:01:08 +00:00
parent 4ee8aea2a7
commit 31648eb1cf
4 changed files with 18 additions and 8 deletions

View File

@ -34,7 +34,7 @@ static void test4(SkCanvas* canvas) {
};
SkPath path;
SkPoint* ptPtr = pts;
for (int i = 0; i < sizeof(verbs); ++i) {
for (size_t i = 0; i < sizeof(verbs); ++i) {
switch ((SkPath::Verb) verbs[i]) {
case SkPath::kMove_Verb:
path.moveTo(ptPtr->fX, ptPtr->fY);
@ -47,6 +47,9 @@ static void test4(SkCanvas* canvas) {
case SkPath::kClose_Verb:
path.close();
break;
default:
SkASSERT(false);
break;
}
}
SkRect clip = {0, 130, 772, 531};

View File

@ -87,7 +87,14 @@
'cflags': ['-O2']
},
},
'cflags': [ '-Wall', '-Wextra', '-Wno-unused' ],
'cflags': [
'-Wall',
'-Wextra',
'-Wno-unused',
# suppressions below here were added for clang
'-Wno-unused-parameter',
'-Wno-c++11-extensions'
],
'include_dirs' : [
'/usr/include/freetype2',
],

View File

@ -20,7 +20,7 @@ SkMesaGLContext::AutoContextRestore::AutoContextRestore() {
}
SkMesaGLContext::AutoContextRestore::~AutoContextRestore() {
if (NULL != fOldContext) {
if (NULL != (OSMesaContext)fOldContext) {
OSMesaMakeCurrent((OSMesaContext)fOldContext, fOldImage,
fOldFormat, fOldWidth, fOldHeight);
}

View File

@ -26,7 +26,7 @@ SkPMColor getCanvasColor(int x, int y) {
U8CPU g = y;
U8CPU b = 0xc;
U8CPU a = 0xff;
U8CPU a = 0x0;
switch ((x+y) % 5) {
case 0:
a = 0xff;
@ -37,12 +37,12 @@ SkPMColor getCanvasColor(int x, int y) {
case 2:
a = 0xCC;
break;
case 4:
a = 0x01;
break;
case 3:
a = 0x00;
break;
case 4:
a = 0x01;
break;
}
return SkPremultiplyARGBInline(a, r, g, b);
}
@ -99,7 +99,7 @@ uint32_t getBitmapColor(int x, int y, int w, int h, SkCanvas::Config8888 config8
U8CPU b = n & 0xff;
U8CPU g = (n >> 8) & 0xff;
U8CPU r = (n >> 16) & 0xff;
U8CPU a;
U8CPU a = 0;
switch ((x+y) % 5) {
case 4:
a = 0xff;