Kernel: Fix gcc warning in qsharedmemory_win.cpp
authorKai Koehne <kai.koehne@nokia.com>
Wed, 12 Sep 2012 13:43:09 +0000 (15:43 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 13 Sep 2012 14:46:31 +0000 (16:46 +0200)
Fix gcc 4.7 'arning: converting 'false' to pointer type 'HANDLE {aka void*}' [-Wconversion-null]'

Change-Id: I28d890d5fd4975517a9329d68c9ef73f6fadf36c
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/corelib/kernel/qsharedmemory_win.cpp

index c3f8dcf..e21eb28 100644 (file)
@@ -103,7 +103,7 @@ HANDLE QSharedMemoryPrivate::handle()
         if (nativeKey.isEmpty()) {
             error = QSharedMemory::KeyError;
             errorString = QSharedMemory::tr("%1: unable to make key").arg(function);
-            return false;
+            return 0;
         }
 #ifndef Q_OS_WINCE
         hand = OpenFileMapping(FILE_MAP_ALL_ACCESS, false, (wchar_t*)nativeKey.utf16());
@@ -114,7 +114,7 @@ HANDLE QSharedMemoryPrivate::handle()
 #endif
         if (!hand) {
             setErrorString(function);
-            return false;
+            return 0;
         }
     }
     return hand;