[Bf-blender-cvs] [90f6458] master: GHost: Code cleanup, prepare for strict C++ flags

Sergey Sharybin noreply at git.blender.org
Fri Mar 27 14:23:50 CET 2015


Commit: 90f645855a8de5d0841435bef4d0620d0a252f13
Author: Sergey Sharybin
Date:   Fri Mar 27 15:41:52 2015 +0500
Branches: master
https://developer.blender.org/rB90f645855a8de5d0841435bef4d0620d0a252f13

GHost: Code cleanup, prepare for strict C++ flags

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

M	intern/ghost/GHOST_IWindow.h
M	intern/ghost/intern/GHOST_Context.h
M	intern/ghost/intern/GHOST_DisplayManagerX11.cpp
M	intern/ghost/intern/GHOST_System.cpp
M	intern/ghost/intern/GHOST_SystemPathsX11.cpp
M	intern/ghost/intern/GHOST_SystemX11.cpp
M	intern/ghost/intern/GHOST_SystemX11.h
M	intern/ghost/intern/GHOST_Window.cpp
M	intern/ghost/intern/GHOST_Window.h
M	intern/ghost/intern/GHOST_WindowManager.cpp
M	intern/ghost/intern/GHOST_WindowX11.cpp

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

diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h
index 3f8215d..649f067 100644
--- a/intern/ghost/GHOST_IWindow.h
+++ b/intern/ghost/GHOST_IWindow.h
@@ -323,7 +323,9 @@ public:
 	 * \param   grab The new grab state of the cursor.
 	 * \return  Indication of success.
 	 */
-	virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds, GHOST_TInt32 mouse_ungrab_xy[2]) { return GHOST_kSuccess; }
+	virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode /*mode*/,
+	                                     GHOST_Rect * /*bounds*/,
+	                                     GHOST_TInt32 /*mouse_ungrab_xy*/[2]) { return GHOST_kSuccess; }
 
 	/** */
 	virtual GHOST_TSuccess beginFullScreen() const = 0;
diff --git a/intern/ghost/intern/GHOST_Context.h b/intern/ghost/intern/GHOST_Context.h
index 0dfea86..18d36c4 100644
--- a/intern/ghost/intern/GHOST_Context.h
+++ b/intern/ghost/intern/GHOST_Context.h
@@ -99,7 +99,7 @@ public:
 	 * \param interval The swap interval to use.
 	 * \return A boolean success indicator.
 	 */
-	virtual GHOST_TSuccess setSwapInterval(int interval) {
+	virtual GHOST_TSuccess setSwapInterval(int /*interval*/) {
 		return GHOST_kFailure;
 	}
 
diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
index 24289e6..e0d5430 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
+++ b/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
@@ -171,7 +171,7 @@ getCurrentDisplaySetting(
 GHOST_TSuccess
 GHOST_DisplayManagerX11::
 setCurrentDisplaySetting(
-		GHOST_TUns8 display,
+		GHOST_TUns8 /*display*/,
 		const GHOST_DisplaySetting& setting)
 {
 #ifdef WITH_X11_XF86VMODE
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index fef8fda..baa1bdf 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -169,7 +169,7 @@ GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting
 }
 
 
-GHOST_TSuccess GHOST_System::updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window)
+GHOST_TSuccess GHOST_System::updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow ** /*window*/)
 {
 	GHOST_TSuccess success = GHOST_kFailure;
 	GHOST_ASSERT(m_windowManager, "GHOST_System::updateFullScreen(): invalid window manager");
@@ -371,7 +371,7 @@ GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window **window, const
 }
 
 
-int GHOST_System::confirmQuit(GHOST_IWindow *window) const
+int GHOST_System::confirmQuit(GHOST_IWindow * /*window*/) const
 {
 	return 1;
 }
diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
index e2d9733..5473e40 100644
--- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
@@ -121,7 +121,7 @@ const GHOST_TUns8 *GHOST_SystemPathsX11::getBinaryDir() const
 	return NULL;
 }
 
-void GHOST_SystemPathsX11::addToSystemRecentFiles(const char *filename) const
+void GHOST_SystemPathsX11::addToSystemRecentFiles(const char * /*filename*/) const
 {
 	/* XXXXX TODO: Implementation for X11 if possible */
 
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 241ce97..7a4fb25 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -329,7 +329,7 @@ createWindow(const STR_String& title,
 }
 
 #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
-static void destroyIMCallback(XIM xim, XPointer ptr, XPointer data)
+static void destroyIMCallback(XIM /*xim*/, XPointer ptr, XPointer /*data*/)
 {
 	GHOST_PRINT("XIM server died\n");
 
@@ -1882,7 +1882,7 @@ GHOST_TSuccess GHOST_SystemX11::pushDragDropEvent(GHOST_TEventType eventType,
  * Basically it will not crash blender now if you have a X device that
  * is configured but not plugged in.
  */
-int GHOST_X11_ApplicationErrorHandler(Display *display, XErrorEvent *theEvent)
+int GHOST_X11_ApplicationErrorHandler(Display * /*display*/, XErrorEvent *theEvent)
 {
 	fprintf(stderr, "Ignoring Xlib error: error code %d request code %d\n",
 	        theEvent->error_code, theEvent->request_code);
@@ -1891,7 +1891,7 @@ int GHOST_X11_ApplicationErrorHandler(Display *display, XErrorEvent *theEvent)
 	return 0;
 }
 
-int GHOST_X11_ApplicationIOErrorHandler(Display *display)
+int GHOST_X11_ApplicationIOErrorHandler(Display * /*display*/)
 {
 	fprintf(stderr, "Ignoring Xlib error: error IO\n");
 
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 4004bda..a5c1329 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -271,7 +271,7 @@ public:
 	/**
 	 * \see GHOST_ISystem
 	 */
-	int toggleConsole(int action) {
+	int toggleConsole(int /*action*/) {
 		return 0;
 	}
 
diff --git a/intern/ghost/intern/GHOST_Window.cpp b/intern/ghost/intern/GHOST_Window.cpp
index dd6154a..71fa260 100644
--- a/intern/ghost/intern/GHOST_Window.cpp
+++ b/intern/ghost/intern/GHOST_Window.cpp
@@ -46,7 +46,7 @@ GHOST_Window::GHOST_Window(
         GHOST_TUns32 width, GHOST_TUns32 height,
         GHOST_TWindowState state,
         const bool wantStereoVisual,
-        const bool exclusive,
+        const bool /*exclusive*/,
         const GHOST_TUns16 wantNumOfAASamples)
     : m_drawingContextType(GHOST_kDrawingContextTypeNone),
       m_cursorVisible(true),
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index b78a690..d894a30 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -182,7 +182,7 @@ public:
 	 * Sets the progress bar value displayed in the window/application icon
 	 * \param progress The progress % (0.0 to 1.0)
 	 */
-	virtual GHOST_TSuccess setProgressBar(float progress) {
+	virtual GHOST_TSuccess setProgressBar(float /*progress*/) {
 		return GHOST_kFailure;
 	}
 	
@@ -329,7 +329,7 @@ protected:
 	 * Sets the cursor grab on the window using
 	 * native window system calls.
 	 */
-	virtual GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) {
+	virtual GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode /*mode*/) {
 		return GHOST_kSuccess;
 	}
 	
diff --git a/intern/ghost/intern/GHOST_WindowManager.cpp b/intern/ghost/intern/GHOST_WindowManager.cpp
index 1f20e01..83490ce 100644
--- a/intern/ghost/intern/GHOST_WindowManager.cpp
+++ b/intern/ghost/intern/GHOST_WindowManager.cpp
@@ -121,7 +121,7 @@ GHOST_IWindow *GHOST_WindowManager::getFullScreenWindow(void) const
 
 
 GHOST_TSuccess GHOST_WindowManager::beginFullScreen(GHOST_IWindow *window,
-		bool stereoVisual)
+		bool /*stereoVisual*/)
 {
 	GHOST_TSuccess success = GHOST_kFailure;
 	GHOST_ASSERT(window, "GHOST_WindowManager::beginFullScreen(): invalid window");
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 613b4df..a2d7303 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -561,7 +561,7 @@ GHOST_WindowX11(
 }
 
 #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
-static void destroyICCallback(XIC xic, XPointer ptr, XPointer data)
+static void destroyICCallback(XIC /*xic*/, XPointer ptr, XPointer /*data*/)
 {
 	GHOST_PRINT("XIM input context destroyed\n");
 
@@ -1536,8 +1536,8 @@ setWindowCustomCursorShape(
 		int sizey,
 		int hotX,
 		int hotY,
-		int fg_color,
-		int bg_color)
+		int /*fg_color*/,
+		int /*bg_color*/)
 {
 	Colormap colormap = DefaultColormap(m_display, m_visualInfo->screen);
 	Pixmap bitmap_pix, mask_pix;




More information about the Bf-blender-cvs mailing list