diff options
author | 2014-02-21 20:11:42 +0000 | |
---|---|---|
committer | 2014-02-21 20:11:42 +0000 | |
commit | 4324c3ba707a567d45628b80073c2e44d2d0e4e4 (patch) | |
tree | ebcc017cc51f3cb01f6e9dd8453501b56c859204 | |
parent | 032a52fd4ceda001e44b80ff0462b570817bfe6f (diff) |
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
-rw-r--r-- | gyp/libjpeg.gyp | 10 | ||||
-rw-r--r-- | gyp/libwebp.gyp | 6 | ||||
-rw-r--r-- | src/animator/SkDisplayType.cpp | 2 | ||||
-rw-r--r-- | tests/GLProgramsTest.cpp | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/gyp/libjpeg.gyp b/gyp/libjpeg.gyp index 88ba298475..b10ee8c6e4 100644 --- a/gyp/libjpeg.gyp +++ b/gyp/libjpeg.gyp @@ -101,14 +101,10 @@ '../third_party/externals/libjpeg', ], }, - 'conditions': [ - [ 'skia_os != "win"', { - 'product_name': 'jpeg', - 'cflags': [ - '-Wno-main', # supresses warnings about naming things "main" - ], - }], + 'cflags': [ + '-w', # supresses warnings ], + }, ], }, { diff --git a/gyp/libwebp.gyp b/gyp/libwebp.gyp index cacfab63ba..22a51ba13f 100644 --- a/gyp/libwebp.gyp +++ b/gyp/libwebp.gyp @@ -34,6 +34,7 @@ '../third_party/externals/libwebp/src/dec/vp8l.c', '../third_party/externals/libwebp/src/dec/webp.c', ], + 'cflags': [ '-w' ], }, { 'target_name': 'libwebp_demux', @@ -44,6 +45,7 @@ 'sources': [ '../third_party/externals/libwebp/src/demux/demux.c', ], + 'cflags': [ '-w' ], }, { 'target_name': 'libwebp_dsp', @@ -62,6 +64,7 @@ '../third_party/externals/libwebp/src/dsp/upsampling_sse2.c', '../third_party/externals/libwebp/src/dsp/yuv.c', ], + 'cflags': [ '-w' ], 'conditions': [ ['skia_os == "android"', { 'dependencies' : [ @@ -87,7 +90,7 @@ 'cflags!': [ '-mfpu=vfpv3-d16', ], - 'cflags': [ '-mfpu=neon' ], + 'cflags': [ '-mfpu=neon', '-w' ], },{ # !(arm_version >= 7) 'type': 'none', }], @@ -139,6 +142,7 @@ '../third_party/externals/libwebp/src/utils/thread.c', '../third_party/externals/libwebp/src/utils/utils.c', ], + 'cflags': [ '-w' ], }, { 'target_name': 'libwebp', diff --git a/src/animator/SkDisplayType.cpp b/src/animator/SkDisplayType.cpp index dc52f0cacc..4461a4b77b 100644 --- a/src/animator/SkDisplayType.cpp +++ b/src/animator/SkDisplayType.cpp @@ -372,7 +372,7 @@ const SkMemberInfo* SkDisplayType::GetMembers(SkAnimateMaker* maker, const SkMemberInfo* SkDisplayType::GetMember(SkAnimateMaker* maker, SkDisplayTypes type, const char** matchPtr ) { - int infoCount; + int infoCount = 0; // Initialize to remove a warning. const SkMemberInfo* info = GetMembers(maker, type, &infoCount); info = SkMemberInfo::Find(info, infoCount, matchPtr); // SkASSERT(info); diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 552574c5a9..e63342c936 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -154,7 +154,7 @@ bool GrGpuGL::programUnitTest(int maxStages) { int currAttribIndex = 1; // we need to always leave room for position int currTextureCoordSet = 0; - int attribIndices[2]; + int attribIndices[2] = { 0, 0 }; GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()}; int numStages = random.nextULessThan(maxStages + 1); |