Turn down warning level for GN build of image_diff utility
authorTom Sepez <tsepez@chromium.org>
Sat, 21 Mar 2015 00:09:28 +0000 (17:09 -0700)
committerTom Sepez <tsepez@chromium.org>
Sat, 21 Mar 2015 00:09:28 +0000 (17:09 -0700)
Next attempt to get GN build to work.  Once this lands, doing a DEPS
roll against the win8_chromium_gn_dbg trybot seems to catch the issue.

Restore image_diff_png.cc to its previous state.

R=thestig@chromium.org

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

samples/BUILD.gn
samples/image_diff_png.cc

index 1bb15a3..748a2af 100644 (file)
@@ -44,7 +44,11 @@ executable("pdfium_diff") {
     "//third_party/pdfium",
     ":fx_lpng",
   ]
-  configs += [ ":pdfium_samples_config" ]
+  configs -= [ "//build/config/compiler:chromium_code" ]
+  configs += [
+    ":pdfium_samples_config",
+    "//build/config/compiler:no_chromium_code",
+  ]
 }
 
 static_library("fx_lpng") {
index a54dc81..04c2591 100644 (file)
@@ -219,6 +219,9 @@ void DecodeInfoCallback(png_struct* png_ptr, png_info* info_ptr) {
         state->row_converter = &ConvertRGBtoBGRA;
         state->output_channels = 4;
         break;
+      default:
+        NOTREACHED();
+        break;
     }
   } else if (channels == 4) {
     switch (state->output_format) {
@@ -234,6 +237,9 @@ void DecodeInfoCallback(png_struct* png_ptr, png_info* info_ptr) {
         state->row_converter = &ConvertBetweenBGRAandRGBA;
         state->output_channels = 4;
         break;
+      default:
+        NOTREACHED();
+        break;
     }
   } else {
     NOTREACHED();
@@ -562,6 +568,10 @@ bool EncodeWithCompressionLevel(const unsigned char* input, ColorFormat format,
         converter = ConvertBetweenBGRAandRGBA;
       }
       break;
+
+    default:
+      NOTREACHED();
+      return false;
   }
 
   // Row stride should be at least as long as the length of the data.