[poppler] goo/gfile.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Jun 1 05:01:47 PDT 2013


 goo/gfile.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dd30ce39252a3820254b43f90699849ab5a1ca58
Author: Hib Eris <hib at hiberis.nl>
Date:   Fri May 31 12:24:55 2013 +0200

    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

diff --git a/goo/gfile.cc b/goo/gfile.cc
index 2371db2..9d0699a 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -18,7 +18,7 @@
 // Copyright (C) 2006 Takashi Iwai <tiwai at suse.de>
 // Copyright (C) 2006 Kristian Høgsberg <krh at redhat.com>
 // Copyright (C) 2008 Adam Batkin <adam at batkin.net>
-// Copyright (C) 2008, 2010, 2012 Hib Eris <hib at hiberis.nl>
+// Copyright (C) 2008, 2010, 2012, 2013 Hib Eris <hib at hiberis.nl>
 // Copyright (C) 2009, 2012 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2009 Kovid Goyal <kovid at kovidgoyal.net>
 // Copyright (C) 2013 Adam Reichold <adamreichold at myopera.com>
@@ -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);
 


More information about the poppler mailing list