REGRESSION (r173988): Fix unused variable warning in PDFDocumentImage.cpp
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Sep 2014 21:05:01 +0000 (21:05 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Sep 2014 21:05:01 +0000 (21:05 +0000)
Fixes the following build failure in release builds:

    WebCore/platform/graphics/cg/PDFDocumentImage.cpp:230:12: error: unused variable 'pageCount' [-Werror,-Wunused-variable]

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::computeBoundsForCurrentPage): Change
ASSERT() to call pageCount().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp

index c9638c079ab325ab1dae4101fc595e89afff4700..09480786bc3e5d9770c9c9610aedb9d6c38c2aae 100644 (file)
@@ -1,3 +1,15 @@
+2014-09-26  David Kilzer  <ddkilzer@apple.com>
+
+        REGRESSION (r173988): Fix unused variable warning in PDFDocumentImage.cpp
+
+        Fixes the following build failure in release builds:
+
+            WebCore/platform/graphics/cg/PDFDocumentImage.cpp:230:12: error: unused variable 'pageCount' [-Werror,-Wunused-variable]
+
+        * platform/graphics/cg/PDFDocumentImage.cpp:
+        (WebCore::PDFDocumentImage::computeBoundsForCurrentPage): Change
+        ASSERT() to call pageCount().
+
 2014-09-26  Brian J. Burg  <burg@cs.washington.edu>
 
         StorageTracker::deleteOrigin being called off the main thread (ASSERTs in inspector/test-harness-trivially-works.html test)
index ce2d0cdbe4d0e0b7adcf6138cc6b5974fc4309ca..ad33b613241b9c80751f13f91b2e1314b8639f11 100644 (file)
@@ -227,8 +227,7 @@ void PDFDocumentImage::createPDFDocument()
 
 void PDFDocumentImage::computeBoundsForCurrentPage()
 {
-    size_t pageCount = CGPDFDocumentGetNumberOfPages(m_document.get());
-    ASSERT(pageCount > 0);
+    ASSERT(pageCount() > 0);
     CGPDFPageRef cgPage = CGPDFDocumentGetPage(m_document.get(), 1);
     CGRect mediaBox = CGPDFPageGetBoxRect(cgPage, kCGPDFMediaBox);