Bug 111562 - [Qt] Illegal narrowing in tst_qwebhistory
Summary: [Qt] Illegal narrowing in tst_qwebhistory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 05:13 PST by Allan Sandfeld Jensen
Modified: 2013-03-06 06:31 PST (History)
1 user (show)

See Also:


Attachments
Patch (2.51 KB, patch)
2013-03-06 05:15 PST, Allan Sandfeld Jensen
jturcotte: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>