From a2def710ce4ac78d6897ba1cec18e0c95d1a7867 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Fri, 31 May 2013 12:24:55 +0200 Subject: [PATCH] Fix warning on narrowing conversion from int to DWORD Fixes warning when compiling for Windows: gfile.cc: In member function 'Goffset GooFile::size() const': gfile.cc:609:30: warning: narrowing conversion of '-1' from 'int' to 'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing] LARGE_INTEGER size = {-1,-1}; https://bugs.freedesktop.org/show_bug.cgi?id=65239 --- goo/gfile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goo/gfile.cc b/goo/gfile.cc index 2371db2..9122aed 100644 --- a/goo/gfile.cc +++ b/goo/gfile.cc @@ -606,7 +606,7 @@ int GooFile::read(char *buf, int n, Goffset offset) const { } Goffset GooFile::size() const { - LARGE_INTEGER size = {-1,-1}; + LARGE_INTEGER size = {(DWORD)-1,-1}; GetFileSizeEx(handle, &size); -- 1.8.1.2