Fix compiler warnings on windows.

Ignore some warnings inside 3rd party code and fix a lot of conversion
warnings.

Change-Id: I909f2f31a4639015bf7dd028d2d435ff1d1167bc
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
David Schulz
2016-04-20 09:33:21 +02:00
parent 89c2b2cd32
commit cc04b84917
13 changed files with 50 additions and 37 deletions

View File

@@ -28,6 +28,7 @@
#include "fileutils.h"
#ifdef Q_OS_WIN
# include <windows.h>
# include <io.h>
#else
# include <unistd.h>
# include <sys/stat.h>
@@ -97,7 +98,7 @@ bool SaveFile::commit()
return false;
}
#ifdef Q_OS_WIN
FlushFileBuffers(reinterpret_cast<HANDLE>(handle()));
FlushFileBuffers(reinterpret_cast<HANDLE>(_get_osfhandle(handle())));
#elif _POSIX_SYNCHRONIZED_IO > 0
fdatasync(handle());
#else