[Bf-blender-cvs] [717bf85] master: Fix some harmless warnings that mostly appeared on MinGW64

Antony Riakiotakis noreply at git.blender.org
Mon Jan 13 05:29:04 CET 2014


Commit: 717bf85545989eb91d429108202294da24cbb565
Author: Antony Riakiotakis
Date:   Mon Jan 13 04:28:51 2014 +0200
https://developer.blender.org/rB717bf85545989eb91d429108202294da24cbb565

Fix some harmless warnings that mostly appeared on MinGW64

===================================================================

M	intern/ghost/intern/GHOST_DropTargetWin32.h
M	intern/ghost/intern/GHOST_SystemWin32.h
M	intern/ghost/intern/GHOST_TaskbarWin32.h
M	intern/ghost/intern/GHOST_WindowWin32.cpp
M	intern/ghost/intern/GHOST_WindowWin32.h
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/blenlib/intern/winstuff.c
M	source/blender/editors/space_view3d/view3d_edit.c
M	source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h
index 56bae1f..fb85fef 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.h
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.h
@@ -89,7 +89,7 @@ public:
 	 * Destructor
 	 * Do NOT destroy directly. Use Release() instead to make COM happy.
 	 */
-	~GHOST_DropTargetWin32();
+	virtual ~GHOST_DropTargetWin32();
 
 private:
 
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index 2aef4ba..18aadfb 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -37,7 +37,9 @@
 #error WIN32 only!
 #endif // WIN32
 
+#ifndef __MINGW64__
 #define _WIN32_WINNT 0x501 // require Windows XP or newer
+#endif
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <ole2.h> // for drag-n-drop
diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h
index 34908a5..4351b38 100644
--- a/intern/ghost/intern/GHOST_TaskbarWin32.h
+++ b/intern/ghost/intern/GHOST_TaskbarWin32.h
@@ -8,7 +8,9 @@
 #error WIN32 only!
 #endif // WIN32
 
+#ifndef __MINGW64__
 #define _WIN32_WINNT 0x501 // require Windows XP or newer
+#endif
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <shlobj.h>
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 8290f4e..f5b7166 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -128,6 +128,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(
 	:
 	GHOST_Window(width, height, state, GHOST_kDrawingContextTypeNone,
 	             stereoVisual, false, numOfAASamples),
+	m_inLiveResize(false),
 	m_system(system),
 	m_hDC(0),
 	m_hGlRc(0),
@@ -151,8 +152,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(
 	m_normal_state(GHOST_kWindowStateNormal),
 	m_stereo(stereoVisual),
 	m_nextWindow(NULL),
-	m_parentWindowHwnd(parentwindowhwnd),
-	m_inLiveResize(false)
+	m_parentWindowHwnd(parentwindowhwnd)
 {
 	OSVERSIONINFOEX versionInfo;
 	bool hasMinVersionForTaskbar = false;
diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h
index 6fdc963..4ccb24c 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.h
+++ b/intern/ghost/intern/GHOST_WindowWin32.h
@@ -40,7 +40,9 @@
 #include "GHOST_Window.h"
 #include "GHOST_TaskbarWin32.h"
 
+#ifndef __MINGW64__
 #define _WIN32_WINNT 0x501 // require Windows XP or newer
+#endif
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index a08103d..9b25410 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -116,7 +116,7 @@ static void tend(void)
 {
 	QueryPerformanceCounter(&liCurrentTime);
 }
-static double tval(void)
+static double UNUSED_FUNCTION(tval) (void)
 {
 	return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart) * (double)1000.0 / (double)liFrequency.QuadPart));
 }
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 071675c..b057215 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -92,7 +92,9 @@ void RegisterBlendExtension(void)
 	const char *ThumbHandlerDLL;
 	char RegCmd[MAX_PATH * 2];
 	char MBox[256];
+#ifndef WIN64
 	BOOL IsWOW64;
+#endif
 
 	printf("Registering file extension...");
 	GetModuleFileName(0, BlPath, MAX_PATH);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index dcd841f..842f1f2 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -4136,7 +4136,6 @@ void ED_view3d_cursor3d_position(bContext *C, float fp[3], const int mval[2])
 	ARegion *ar = CTX_wm_region(C);
 	View3D *v3d = CTX_wm_view3d(C);
 	RegionView3D *rv3d = CTX_wm_region_view3d(C);
-	float zfac;
 	bool flip;
 	bool depth_used = false;
 	
@@ -4145,13 +4144,13 @@ void ED_view3d_cursor3d_position(bContext *C, float fp[3], const int mval[2])
 	if (rv3d == NULL)
 		return;
 
-	zfac = ED_view3d_calc_zfac(rv3d, fp, &flip);
+	ED_view3d_calc_zfac(rv3d, fp, &flip);
 	
 	/* reset the depth based on the view offset (we _know_ the offset is infront of us) */
 	if (flip) {
 		negate_v3_v3(fp, rv3d->ofs);
 		/* re initialize, no need to check flip again */
-		zfac = ED_view3d_calc_zfac(rv3d, fp, NULL /* &flip */ );
+		ED_view3d_calc_zfac(rv3d, fp, NULL /* &flip */ );
 	}
 
 	if (U.uiflag & USER_ZBUF_CURSOR) {  /* maybe this should be accessed some other way */
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 19b8776..28fc222 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1269,7 +1269,8 @@ void WM_clipboard_text_set(const char *buf, bool selection)
 	if (!G.background) {
 #ifdef _WIN32
 		/* do conversion from \n to \r\n on Windows */
-		char *p, *p2, *newbuf;
+		const char *p;
+		char *p2, *newbuf;
 		int newlen = 0;
 		
 		for (p = buf; *p; p++) {




More information about the Bf-blender-cvs mailing list