summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-06-04 20:22:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 20:22:08 +0000
commit80c6ab7b99bcbd7b940f78dc0cac52c30249f59c (patch)
tree0e65dfe95df518322656ecf5fab5432b1b6ba18f /samples
parent36aae4fc09a353e01738bf0bbc302a21ba21ed07 (diff)
downloadpdfium-80c6ab7b99bcbd7b940f78dc0cac52c30249f59c.tar.xz
Convert (void) to static_cast<void> in C++ codechromium/3450
Converting instances of old C-style void casts to suppress return values to use C++ style static cases. There are a few examples of (void) that remain, since they are in C code, and the third_party/ instances are not touched at all. Change-Id: I72b3fc0e1d713db669b76135e03d1cf87873a2fe Reviewed-on: https://pdfium-review.googlesource.com/33790 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'samples')
-rw-r--r--samples/pdfium_test.cc2
-rw-r--r--samples/pdfium_test_write_helper.cc10
2 files changed, 6 insertions, 6 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index d2e84872d6..0491840b34 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -682,7 +682,7 @@ void RenderPdf(const std::string& name,
return;
}
- (void)FPDF_GetDocPermissions(doc.get());
+ static_cast<void>(FPDF_GetDocPermissions(doc.get()));
if (options.show_metadata)
DumpMetaData(doc.get());
diff --git a/samples/pdfium_test_write_helper.cc b/samples/pdfium_test_write_helper.cc
index c436c97fbe..758f5efe72 100644
--- a/samples/pdfium_test_write_helper.cc
+++ b/samples/pdfium_test_write_helper.cc
@@ -211,7 +211,7 @@ void WriteText(FPDF_PAGE page, const char* pdf_name, int num) {
uint32_t bom = 0x0000FEFF;
if (fwrite(&bom, sizeof(bom), 1, fp) != 1) {
fprintf(stderr, "Failed to write to %s\n", filename);
- (void)fclose(fp);
+ static_cast<void>(fclose(fp));
return;
}
@@ -223,7 +223,7 @@ void WriteText(FPDF_PAGE page, const char* pdf_name, int num) {
break;
}
}
- (void)fclose(fp);
+ static_cast<void>(fclose(fp));
}
void WriteAnnot(FPDF_PAGE page, const char* pdf_name, int num) {
@@ -343,7 +343,7 @@ void WriteAnnot(FPDF_PAGE page, const char* pdf_name, int num) {
}
}
- (void)fclose(fp);
+ static_cast<void>(fclose(fp));
}
std::string WritePng(const char* pdf_name,
@@ -383,7 +383,7 @@ std::string WritePng(const char* pdf_name,
if (bytes_written != png_encoding.size())
fprintf(stderr, "Failed to write to %s\n", filename);
- (void)fclose(fp);
+ static_cast<void>(fclose(fp));
return std::string(filename);
}
@@ -649,6 +649,6 @@ void WriteImages(FPDF_PAGE page, const char* pdf_name, int page_num) {
else
fprintf(stderr, "Successfully wrote embedded image %s.\n", filename);
- (void)fclose(fp);
+ static_cast<void>(fclose(fp));
}
}