Bug 111562

Summary: [Qt] Illegal narrowing in tst_qwebhistory
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: WebKit QtAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: jturcotte
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch jturcotte: review+

Description Allan Sandfeld Jensen 2013-03-06 05:13:11 PST
The bytearray in tst_QWebHistory::restoreIncompatibleVersion1 has integer values higher than 127 assigned into an array of signed chars. This works correctly but causes compiler errors in C++11 since it assigns constants (>127) that doesn't fit the destination (-128 to 127).
Comment 1 Allan Sandfeld Jensen 2013-03-06 05:15:06 PST
Created attachment 191722 [details]
Patch
Comment 2 Jocelyn Turcotte 2013-03-06 05:32:34 PST
Comment on attachment 191722 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=191722&action=review

Oops

> Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp:517
> +    QByteArray version1((const char*)version1Dump, sizeof(version1Dump));

Nit: static_cast
Comment 3 Allan Sandfeld Jensen 2013-03-06 06:31:27 PST
Committed r144918: <http://trac.webkit.org/changeset/144918>