[GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
authortpopela@redhat.com <tpopela@redhat.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 14:14:04 +0000 (14:14 +0000)
committertpopela@redhat.com <tpopela@redhat.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 14:14:04 +0000 (14:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169027

Reviewed by Carlos Garcia Campos.

Initialize the lastPagePosition variable and remove an unused one
- totalToPrint.

* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::PrintPagesData::PrintPagesData):

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp

index 98f69ca..dea962f 100644 (file)
@@ -1,3 +1,16 @@
+2017-03-01  Tomas Popela  <tpopela@redhat.com>
+
+        [GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=169027
+
+        Reviewed by Carlos Garcia Campos.
+
+        Initialize the lastPagePosition variable and remove an unused one
+        - totalToPrint.
+
+        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
+        (WebKit::PrintPagesData::PrintPagesData):
+
 2017-03-01  Andreas Kling  <akling@apple.com>
 
         Move MemoryPressureHandler to WTF
index b6205db..fdd4193 100644 (file)
@@ -210,6 +210,7 @@ struct PrintPagesData {
         , firstSheetNumber(0)
         , numberOfSheets(0)
         , firstPagePosition(0)
+        , lastPagePosition(0)
         , collated(0)
         , uncollated(0)
         , isDone(false)
@@ -362,7 +363,6 @@ struct PrintPagesData {
     GRefPtr<GMainLoop> mainLoop;
 
     int totalPrinted;
-    size_t totalToPrint;
     int pageNumber;
     Vector<size_t> pages;
     size_t sheetNumber;