From 694fc9d00fcfb6c212103e4a7009af53044eb888 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 18 Nov 2015 23:46:57 +0200 Subject: libdivecomputer.h: fix warning with DC_VERSION on Win32 "warning: "DC_VERSION" redefined" is thrown if a chain of includes previously includes windows.h: In file included from c:/bin/mingw/i686-w64-mingw32/include/windows.h:71:0, from C:/bin/qt/5.5/mingw492_32/include/QtCore/qt_windows.h:63, from C:/bin/qt/5.5/mingw492_32/include/QtGui/qopengl.h:43, from C:/bin/qt/5.5/mingw492_32/include/QtQuick/qquickwindow.h:39, from C:/bin/qt/5.5/mingw492_32/include/QtQuick/QQuickWindow:1, from C:/dev/subsurface/subsurface-core/qt-gui.h:13, from C:\dev\subsurface\subsurface-mobile-main.cpp:9: and which on it's own includes wingdi.h which defines "DC_VERSION 10" (windows printer stack related). To solve the warning DC_VERSION is undefined in subsurface-core/libdivecomputer.h. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- subsurface-core/libdivecomputer.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'subsurface-core') diff --git a/subsurface-core/libdivecomputer.h b/subsurface-core/libdivecomputer.h index 79817e509..f52f6959a 100644 --- a/subsurface-core/libdivecomputer.h +++ b/subsurface-core/libdivecomputer.h @@ -3,6 +3,10 @@ /* libdivecomputer */ + +#ifdef DC_VERSION /* prevent a warning with wingdi.h */ +#undef DC_VERSION +#endif #include #include #include -- cgit v1.2.3-70-g09d2