commit | d405ea8297b664369bb207743fa0e69723034888 | [log] [tgz] |
---|---|---|
author | asweintraub <asweintraub@google.com> | Fri Jun 07 18:44:14 2019 +0000 |
committer | Chromium commit bot <commit-bot@chromium.org> | Fri Jun 07 18:44:14 2019 +0000 |
tree | 54e55e636afd4d83b42883b6a104dfc79ec40cbd | |
parent | 0e0e31dd6a5d8ff38dc8bc692ba2fc1fc087d682 [diff] [blame] |
Fix bug-prone patterns found by ClangTidy * signed shift result sets the sign bit of the shift expression's type ('int') and becomes negative * constructing string from nullptr is undefined behaviour PiperOrigin-RevId: 251948690 Change-Id: Ia69429504f6f8e3c350acf3c63765ad2a8e95e01 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55771 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp index 17d90cc..4a7bda7 100644 --- a/testing/fx_string_testhelpers.cpp +++ b/testing/fx_string_testhelpers.cpp
@@ -42,7 +42,7 @@ std::wstring GetPlatformWString(FPDF_WIDESTRING wstr) { if (!wstr) - return nullptr; + return std::wstring(); size_t characters = 0; while (wstr[characters])