Add extra warnings to match what Android uses.
authordjsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 20 Nov 2013 13:16:47 +0000 (13:16 +0000)
committerdjsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 20 Nov 2013 13:16:47 +0000 (13:16 +0000)
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12310 2bbb7eff-a529-9590-31e7-b0007b416f81

gyp/common_conditions.gypi
gyp/poppler.gyp
platform_tools/android/gyp/dependencies.gypi
src/animator/SkScriptCallBack.h
src/core/SkBuffer.h
src/gpu/gl/GrGLProgramEffects.h

index 770269f2b6fbff9e8ed90b185a03ef3692cb08ac..917298f914fcbf810263e3685d0a99bba9c13bca 100644 (file)
     # The following section is common to linux + derivatives and android
     [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]',
       {
+        'cflags': [
+          '-fno-exceptions',
+          '-fstrict-aliasing',
+        
+          '-Wall',
+          '-Wextra',
+          '-Winit-self',
+          '-Wpointer-arith',
+
+          '-Wno-unused-parameter',
+          '-Wno-c++11-extensions',
+        ],
+        'cflags_cc': [
+          '-fno-rtti',
+          '-Wnon-virtual-dtor',
+        ],
         'conditions': [
           [ 'skia_warnings_as_errors', {
             'cflags': [
             'defines': [ 'NDEBUG' ],
           },
         },
-        'cflags': [
-          '-Wall',
-          '-Wextra',
-          # suppressions below here were added for clang
-          '-Wno-unused-parameter',
-          '-Wno-c++11-extensions',
-        ],
         'conditions' : [
           [ 'skia_shared_lib', {
             'cflags': [
           '-llog',
         ],
         'cflags': [
-          '-Wall',
-          '-fno-exceptions',
-          '-fstrict-aliasing',
           '-fuse-ld=gold',
         ],
-        'cflags_cc': [
-          '-fno-rtti',
-        ],
         'conditions': [
           [ 'skia_shared_lib', {
             'cflags': [
index 5b53389b7883bfdc85eb9801979982ede3eec6f3..027aea381a2e3d09c15aad9b25e302d9395f611d 100644 (file)
       'cflags': [
         '-w'
       ],
+      'cflags_cc!': [
+        '-fno-rtti'
+      ],
       'conditions': [
         ['skia_os == "linux"', {
           'include_dirs': [
index 82763bea115eb285515a853a723f786a2fa15715..bb0db7184bbc8e2d2cb822002609c634e27b221e 100644 (file)
@@ -42,9 +42,7 @@
         '../third_party/externals/expat/lib',
       ],
       'cflags': [
-        '-Wall',
-        '-Wmissing-prototypes',
-        '-Wstrict-prototypes',
+        '-w',
         '-fexceptions',
         '-DHAVE_EXPAT_CONFIG_H',
       ],
         '../third_party/externals/gif',
       ],
       'cflags': [
-        '-Wno-format',
+        '-w',
         '-DHAVE_CONFIG_H',
       ],
-      'cflags!': [
-        '-Wall',
-      ],
       'direct_dependent_settings': {
         'include_dirs': [
           '../third_party/externals/gif',
         '../third_party/externals/png',
       ],
       'cflags': [
+        '-w',
         '-fvisibility=hidden',
       ],
-      'cflags!': [
-        '-Wall',
-      ],
       'link_settings': {
         'libraries': [
           '-lz',
index dcbaf11886ddc756e07af95a1f1c7b9a85f79cbd..fefc482f6166b015007b03463bb383e9dd502314 100644 (file)
@@ -13,6 +13,8 @@
 
 class SkScriptCallBack {
 public:
+    virtual ~SkScriptCallBack() { }
+
     enum Type {
         kBox,
         kFunction,
index 369d9c02ac858fd63db81b39595618f88411e0f4..9791cf55a14a8c5bfde23d7a28effc9d3988f047 100644 (file)
@@ -39,6 +39,8 @@ public:
         fStop = (const char*)data + size;
     }
 
+    virtual ~SkRBuffer() { }
+
     /** Return the number of bytes that have been read from the beginning
         of the data pointer.
     */
index 4572a4250d7c63e035db2f9266187d230ba25bf5..3320891b379cfa43eed6b7e086b7a892f29c8ab5 100644 (file)
@@ -129,6 +129,8 @@ protected:
  */
 class GrGLProgramEffectsBuilder {
 public:
+    virtual ~GrGLProgramEffectsBuilder() { }
+
     /**
      * Emits the effect's shader code, and stores the necessary uniforms internally.
      */
@@ -211,6 +213,7 @@ private:
 class GrGLVertexProgramEffectsBuilder : public GrGLProgramEffectsBuilder {
 public:
     GrGLVertexProgramEffectsBuilder(GrGLFullShaderBuilder*, int reserveCount);
+    virtual ~GrGLVertexProgramEffectsBuilder() { }
 
     virtual void emitEffect(const GrEffectStage&,
                             GrGLProgramEffects::EffectKey,
@@ -298,6 +301,7 @@ private:
 class GrGLTexGenProgramEffectsBuilder : public GrGLProgramEffectsBuilder {
 public:
     GrGLTexGenProgramEffectsBuilder(GrGLFragmentOnlyShaderBuilder*, int reserveCount);
+    virtual ~GrGLTexGenProgramEffectsBuilder() { }
 
     virtual void emitEffect(const GrEffectStage&,
                             GrGLProgramEffects::EffectKey,