Commit 4324c3ba authored by commit-bot@chromium.org's avatar commit-bot@chromium.org
Browse files

Fix warnings on Ubuntu13

Turn off warnings when building libwebp.
Turn off warnings when building libjpeg.
Initialize some variables immediately.

NOTRY=True
NOTREECHECKS=True

BUG=skia:2213
BUG=skia:2214
R=bsalomon@google.com, halcanary@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/175383002

git-svn-id: http://skia.googlecode.com/svn/trunk@13545 2bbb7eff-a529-9590-31e7-b0007b416f81
parent 032a52fd
...@@ -101,14 +101,10 @@ ...@@ -101,14 +101,10 @@
'../third_party/externals/libjpeg', '../third_party/externals/libjpeg',
], ],
}, },
'conditions': [ 'cflags': [
[ 'skia_os != "win"', { '-w', # supresses warnings
'product_name': 'jpeg',
'cflags': [
'-Wno-main', # supresses warnings about naming things "main"
],
}],
], ],
}, },
], ],
}, { }, {
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
'../third_party/externals/libwebp/src/dec/vp8l.c', '../third_party/externals/libwebp/src/dec/vp8l.c',
'../third_party/externals/libwebp/src/dec/webp.c', '../third_party/externals/libwebp/src/dec/webp.c',
], ],
'cflags': [ '-w' ],
}, },
{ {
'target_name': 'libwebp_demux', 'target_name': 'libwebp_demux',
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
'sources': [ 'sources': [
'../third_party/externals/libwebp/src/demux/demux.c', '../third_party/externals/libwebp/src/demux/demux.c',
], ],
'cflags': [ '-w' ],
}, },
{ {
'target_name': 'libwebp_dsp', 'target_name': 'libwebp_dsp',
...@@ -62,6 +64,7 @@ ...@@ -62,6 +64,7 @@
'../third_party/externals/libwebp/src/dsp/upsampling_sse2.c', '../third_party/externals/libwebp/src/dsp/upsampling_sse2.c',
'../third_party/externals/libwebp/src/dsp/yuv.c', '../third_party/externals/libwebp/src/dsp/yuv.c',
], ],
'cflags': [ '-w' ],
'conditions': [ 'conditions': [
['skia_os == "android"', { ['skia_os == "android"', {
'dependencies' : [ 'dependencies' : [
...@@ -87,7 +90,7 @@ ...@@ -87,7 +90,7 @@
'cflags!': [ 'cflags!': [
'-mfpu=vfpv3-d16', '-mfpu=vfpv3-d16',
], ],
'cflags': [ '-mfpu=neon' ], 'cflags': [ '-mfpu=neon', '-w' ],
},{ # !(arm_version >= 7) },{ # !(arm_version >= 7)
'type': 'none', 'type': 'none',
}], }],
...@@ -139,6 +142,7 @@ ...@@ -139,6 +142,7 @@
'../third_party/externals/libwebp/src/utils/thread.c', '../third_party/externals/libwebp/src/utils/thread.c',
'../third_party/externals/libwebp/src/utils/utils.c', '../third_party/externals/libwebp/src/utils/utils.c',
], ],
'cflags': [ '-w' ],
}, },
{ {
'target_name': 'libwebp', 'target_name': 'libwebp',
......
...@@ -372,7 +372,7 @@ const SkMemberInfo* SkDisplayType::GetMembers(SkAnimateMaker* maker, ...@@ -372,7 +372,7 @@ const SkMemberInfo* SkDisplayType::GetMembers(SkAnimateMaker* maker,
const SkMemberInfo* SkDisplayType::GetMember(SkAnimateMaker* maker, const SkMemberInfo* SkDisplayType::GetMember(SkAnimateMaker* maker,
SkDisplayTypes type, const char** matchPtr ) { SkDisplayTypes type, const char** matchPtr ) {
int infoCount; int infoCount = 0; // Initialize to remove a warning.
const SkMemberInfo* info = GetMembers(maker, type, &infoCount); const SkMemberInfo* info = GetMembers(maker, type, &infoCount);
info = SkMemberInfo::Find(info, infoCount, matchPtr); info = SkMemberInfo::Find(info, infoCount, matchPtr);
// SkASSERT(info); // SkASSERT(info);
......
...@@ -154,7 +154,7 @@ bool GrGpuGL::programUnitTest(int maxStages) { ...@@ -154,7 +154,7 @@ bool GrGpuGL::programUnitTest(int maxStages) {
int currAttribIndex = 1; // we need to always leave room for position int currAttribIndex = 1; // we need to always leave room for position
int currTextureCoordSet = 0; int currTextureCoordSet = 0;
int attribIndices[2]; int attribIndices[2] = { 0, 0 };
GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()}; GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()};
int numStages = random.nextULessThan(maxStages + 1); int numStages = random.nextULessThan(maxStages + 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment