summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-07-01 14:08:08 -0700
committerNico Weber <thakis@chromium.org>2015-07-01 14:11:22 -0700
commit2827bddd85edd37a9af6fb4e47882334f007e59b (patch)
treefa1bac0681681b5dc31997a23a15d01ad377b040 /samples/pdfium_test.cc
parent606346f584700bdae0741066f2e6d2481744032c (diff)
downloadpdfium-2827bddd85edd37a9af6fb4e47882334f007e59b.tar.xz
Cherry-pick to XFA: Fix some clang warnings with -Wmissing-braces in pdfium.
Clang warns if there are missing braces around a subobject initializer. The most common idiom that triggers this is: STRUCT s = {0}; if the first field of STRUCT is itself a struct. This can be more simply written as: STRUCT s = {}; which also prevents the warning from firing. Other instances of the warning have been fixed by adding braces where appropriate. R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1213523004.
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 7c6b8b965d..417bd5603b 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -216,7 +216,7 @@ static void WriteBmp(const char* pdf_name, int num, const void* buffer,
if (!fp)
return;
- BITMAPINFO bmi = {0};
+ BITMAPINFO bmi = {};
bmi.bmiHeader.biSize = sizeof(bmi) - sizeof(RGBQUAD);
bmi.bmiHeader.biWidth = width;
bmi.bmiHeader.biHeight = -height; // top-down image
@@ -225,7 +225,7 @@ static void WriteBmp(const char* pdf_name, int num, const void* buffer,
bmi.bmiHeader.biCompression = BI_RGB;
bmi.bmiHeader.biSizeImage = 0;
- BITMAPFILEHEADER file_header = {0};
+ BITMAPFILEHEADER file_header = {};
file_header.bfType = 0x4d42;
file_header.bfSize = sizeof(file_header) + bmi.bmiHeader.biSize + out_len;
file_header.bfOffBits = file_header.bfSize - out_len;