summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfdoc_embeddertest.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-29 16:42:53 -0700
committerWei Li <weili@chromium.org>2016-03-29 16:42:53 -0700
commit05d53f0355e9889c43bfa436e985d5643f249d99 (patch)
treeeca037b407114efe357e8280a96e44eee182cdfc /fpdfsdk/fpdfdoc_embeddertest.cpp
parent602aebc11a615971800d38f8d427a4e4f95c1134 (diff)
downloadpdfium-05d53f0355e9889c43bfa436e985d5643f249d99.tar.xz
Code change to avoid signed/unsigned mismatch warnings.
This makes pdfium code on Linux and Mac sign-compare warning free. The warning flag will be re-enabled after checking on windows clang build. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1841643002 .
Diffstat (limited to 'fpdfsdk/fpdfdoc_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfdoc_embeddertest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
index bf91038ca6..855235858b 100644
--- a/fpdfsdk/fpdfdoc_embeddertest.cpp
+++ b/fpdfsdk/fpdfdoc_embeddertest.cpp
@@ -72,7 +72,7 @@ TEST_F(FPDFDocEmbeddertest, NoBookmarks) {
// The non-existent top-level bookmark has no title.
unsigned short buf[128];
- EXPECT_EQ(0, FPDFBookmark_GetTitle(nullptr, buf, sizeof(buf)));
+ EXPECT_EQ(0u, FPDFBookmark_GetTitle(nullptr, buf, sizeof(buf)));
// The non-existent top-level bookmark has no children.
EXPECT_EQ(nullptr, FPDFBookmark_GetFirstChild(document(), nullptr));
@@ -84,11 +84,11 @@ TEST_F(FPDFDocEmbeddertest, Bookmarks) {
// The existent top-level bookmark has no title.
unsigned short buf[128];
- EXPECT_EQ(0, FPDFBookmark_GetTitle(nullptr, buf, sizeof(buf)));
+ EXPECT_EQ(0u, FPDFBookmark_GetTitle(nullptr, buf, sizeof(buf)));
FPDF_BOOKMARK child = FPDFBookmark_GetFirstChild(document(), nullptr);
EXPECT_NE(nullptr, child);
- EXPECT_EQ(34, FPDFBookmark_GetTitle(child, buf, sizeof(buf)));
+ EXPECT_EQ(34u, FPDFBookmark_GetTitle(child, buf, sizeof(buf)));
EXPECT_EQ(CFX_WideString(L"A Good Beginning"),
CFX_WideString::FromUTF16LE(buf, 16));
@@ -96,7 +96,7 @@ TEST_F(FPDFDocEmbeddertest, Bookmarks) {
FPDF_BOOKMARK sibling = FPDFBookmark_GetNextSibling(document(), child);
EXPECT_NE(nullptr, sibling);
- EXPECT_EQ(28, FPDFBookmark_GetTitle(sibling, buf, sizeof(buf)));
+ EXPECT_EQ(28u, FPDFBookmark_GetTitle(sibling, buf, sizeof(buf)));
EXPECT_EQ(CFX_WideString(L"A Good Ending"),
CFX_WideString::FromUTF16LE(buf, 13));
@@ -115,7 +115,7 @@ TEST_F(FPDFDocEmbeddertest, FindBookmarks) {
// Check that the string matches.
unsigned short buf[128];
- EXPECT_EQ(34, FPDFBookmark_GetTitle(child, buf, sizeof(buf)));
+ EXPECT_EQ(34u, FPDFBookmark_GetTitle(child, buf, sizeof(buf)));
EXPECT_EQ(CFX_WideString(L"A Good Beginning"),
CFX_WideString::FromUTF16LE(buf, 16));