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])