[Webkit-unassigned] [Bug 68350] New: APIClient::initialize does not build with newer gcc
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 19 05:40:52 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=68350
Summary: APIClient::initialize does not build with newer gcc
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit2
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: kbalazs at webkit.org
CC: mrowe at apple.com
With -Werror and -Wextra - which is the default configuration for most of the ports - and gcc 4.5.1 this is the build error:
cc1plus: warnings being treated as errors
/home/balazs/work/master_clean/Source/WebKit2/Shared/APIClient.h: In member function 'void WebKit::WebGeolocationManagerProxy::initializeProvider(const WKGeolocationProvider*)':
/home/balazs/work/master_clean/Source/WebKit2/Shared/APIClient.h:52:13: error: array subscript is below array bounds
The guilty code part is:
if (client && client->version < currentVersion)
memcpy(&m_client, client, APIClientTraits<ClientInterface>::interfaceSizesByVersion[client->version]);
Both currentVersion and client->version are int's and currentVersion - which is a template parameter - is 0.
So the compiler assumes that the memcpy line indexes the array with a negative number.
Seems like it's a bit tricky to write warning free template code.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list