From 93dde26bd553eda38ac4f79ee25eec529c8890a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Wed, 24 Aug 2011 09:00:16 -0400 Subject: [PATCH] Bug 681036 - Fix c++0x initializer list error found by clang. r=karlt The C++11 draft says about initializer lists: "If a narrowing conversion (see below) is required to convert any of the arguments, the program is ill-formed." and "A narrowing conversion is an implicit conversion... from an integer type or unscoped enumeration type to an integer type that cannot represent all the values of the original type, except where the source is a constant expression..." --HG-- extra : rebase_source : c4e5fcc0442050c4d9788c4a260249437acfaea6 --- dom/plugins/test/testplugin/nptest_gtk2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/plugins/test/testplugin/nptest_gtk2.cpp b/dom/plugins/test/testplugin/nptest_gtk2.cpp index cc66bc8cec4..e025deeb7bc 100644 --- a/dom/plugins/test/testplugin/nptest_gtk2.cpp +++ b/dom/plugins/test/testplugin/nptest_gtk2.cpp @@ -541,7 +541,8 @@ static GdkRegion* computeClipRegion(InstanceData* instanceData) return 0; } - GdkRectangle windowRect = { 0, 0, width, height }; + GdkRectangle windowRect = { 0, 0, static_cast(width), + static_cast(height) }; GdkRegion* windowRgn = gdk_region_rectangle(&windowRect); if (!windowRgn) { gdk_region_destroy(region);