summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--samples/image_diff_png.cc10
-rw-r--r--samples/pdfium_test.cc2
2 files changed, 11 insertions, 1 deletions
diff --git a/samples/image_diff_png.cc b/samples/image_diff_png.cc
index 992617d5e5..6ad7f88d81 100644
--- a/samples/image_diff_png.cc
+++ b/samples/image_diff_png.cc
@@ -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.
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 8162287053..86c7afd529 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -6,7 +6,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <wchar.h>
#include <list>
#include <sstream>
@@ -432,6 +431,7 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len,
int nRet = PDF_DATA_NOTAVAIL;
bool bIsLinearized = false;
FPDF_AVAIL pdf_avail = FPDFAvail_Create(&file_avail, &file_access);
+
if (FPDFAvail_IsLinearized(pdf_avail) == PDF_LINEARIZED) {
fprintf(stderr, "Linearized path...\n");
doc = FPDFAvail_GetDocument(pdf_avail, nullptr);