Bug 169027 - [GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
Summary: [GTK] Fix problems found by Coverity scan in WebPrintOperationGtk.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tomas Popela
URL:
Keywords:
Depends on:
Blocks: 104114
  Show dependency treegraph
 
Reported: 2017-03-01 03:37 PST by Tomas Popela
Modified: 2017-03-08 06:48 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2017-03-01 03:41 PST, Tomas Popela
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Popela 2017-03-01 03:37:09 PST
65. webkitgtk-2.14.5/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:365: member_decl: Class member declaration for "totalToPrint".
66. webkitgtk-2.14.5/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:306: uninit_member: Non-static class member "totalToPrint" is not initialized in this constructor nor in any functions that it calls.
67. webkitgtk-2.14.5/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:372: member_decl: Class member declaration for "lastPagePosition".
68. webkitgtk-2.14.5/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:306: uninit_member: Non-static class member "lastPagePosition" is not initialized in this constructor nor in any functions that it calls.
#   304|           firstPagePosition = printOperation->pagePosition();
#   305|           firstSheetNumber = sheetNumber;
#   306|->     }
#   307|   
#   308|       size_t collatedCopiesLeft()

and

69. webkitgtk-2.14.5/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:365: member_decl: Class member declaration for "totalToPrint".
70. webkitgtk-2.14.5/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:299: uninit_member: Non-static class member "totalToPrint" is not initialized in this constructor nor in any functions that it calls.
#   297|           if (sheetNumber * numberUp >= pages.size()) {
#   298|               isValid = false;
#   299|->             return;
#   300|           }
#   301|   

actually the totalToPrint member is not used at all -> remove it.
Comment 1 Tomas Popela 2017-03-01 03:41:35 PST
Created attachment 303058 [details]
Patch
Comment 2 Tomas Popela 2017-03-01 06:16:01 PST
Comment on attachment 303058 [details]
Patch

Clearing flags on attachment: 303058

Committed r213217: <http://trac.webkit.org/changeset/213217>
Comment 3 Tomas Popela 2017-03-01 06:16:10 PST
All reviewed patches have been landed.  Closing bug.