summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHib Eris <hib@hiberis.nl>2013-05-31 12:24:55 +0200
committerAlbert Astals Cid <aacid@kde.org>2013-06-01 14:01:22 +0200
commitdd30ce39252a3820254b43f90699849ab5a1ca58 (patch)
tree0467ae08fc422d1fb68d97b2330b9de49e5d3b51
parent01a825f3f9f5dcf686fc123d2cf80b9c525d0d89 (diff)
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
-rw-r--r--goo/gfile.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/goo/gfile.cc b/goo/gfile.cc
index 2371db2c..9d0699ab 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -18,7 +18,7 @@
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2008 Adam Batkin <adam@batkin.net>
-// Copyright (C) 2008, 2010, 2012 Hib Eris <hib@hiberis.nl>
+// Copyright (C) 2008, 2010, 2012, 2013 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2009, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2013 Adam Reichold <adamreichold@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);