diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-06-01 15:19:04 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-01 15:19:04 +0000 |
commit | 4f21d77576b371270375f1120cba5cf99c248e9d (patch) | |
tree | 2d30a1bbed27764c7c884401ab412343cf45592c | |
parent | 2d11d72e326140b9abeb6de2db1e28e5bf9d7e64 (diff) | |
download | pdfium-4f21d77576b371270375f1120cba5cf99c248e9d.tar.xz |
Fix V8 guards
These guards are using #if, when they should be using #ifdef. Caught
using Clang's static analyzer.
Change-Id: I9bb7a4c2b817e752c04b21a8321595f9676d6381
Reviewed-on: https://pdfium-review.googlesource.com/33511
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
-rw-r--r-- | samples/pdfium_test.cc | 2 | ||||
-rw-r--r-- | testing/unit_test_main.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index e2e386f3c1..d2e84872d6 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -283,7 +283,7 @@ bool ParseCommandLine(const std::vector<std::string>& args, options->save_attachments = true; } else if (cur_arg == "--save-images") { options->save_images = true; -#if PDF_ENABLE_V8 +#ifdef PDF_ENABLE_V8 } else if (cur_arg == "--disable-javascript") { options->disable_javascript = true; #ifdef PDF_ENABLE_XFA diff --git a/testing/unit_test_main.cpp b/testing/unit_test_main.cpp index 8d8755e617..92dceefdb6 100644 --- a/testing/unit_test_main.cpp +++ b/testing/unit_test_main.cpp @@ -10,10 +10,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" -#if PDF_ENABLE_V8 +#ifdef PDF_ENABLE_V8 #include "v8/include/v8-platform.h" #include "v8/include/v8.h" -#endif +#endif // PDF_ENABLE_V8 #if PDF_ENABLE_XFA #include "core/fxge/cfx_fontmgr.h" |