GHost: Code cleanup, prepare for strict C++ flags
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Mar 2015 10:41:52 +0000 (15:41 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Mar 2015 13:23:31 +0000 (18:23 +0500)
intern/ghost/GHOST_IWindow.h
intern/ghost/intern/GHOST_Context.h
intern/ghost/intern/GHOST_DisplayManagerX11.cpp
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_SystemPathsX11.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_Window.h
intern/ghost/intern/GHOST_WindowManager.cpp
intern/ghost/intern/GHOST_WindowX11.cpp

index 3f8215d..649f067 100644 (file)
@@ -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;
index 0dfea86..18d36c4 100644 (file)
@@ -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;
        }
 
index 24289e6..e0d5430 100644 (file)
@@ -171,7 +171,7 @@ getCurrentDisplaySetting(
 GHOST_TSuccess
 GHOST_DisplayManagerX11::
 setCurrentDisplaySetting(
-               GHOST_TUns8 display,
+               GHOST_TUns8 /*display*/,
                const GHOST_DisplaySetting& setting)
 {
 #ifdef WITH_X11_XF86VMODE
index fef8fda..baa1bdf 100644 (file)
@@ -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;
 }
index e2d9733..5473e40 100644 (file)
@@ -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 */
 
index 241ce97..7a4fb25 100644 (file)
@@ -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");
 
index 4004bda..a5c1329 100644 (file)
@@ -271,7 +271,7 @@ public:
        /**
         * \see GHOST_ISystem
         */
-       int toggleConsole(int action) {
+       int toggleConsole(int /*action*/) {
                return 0;
        }
 
index dd6154a..71fa260 100644 (file)
@@ -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),
index b78a690..d894a30 100644 (file)
@@ -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;
        }
        
index 1f20e01..83490ce 100644 (file)
@@ -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");
index 613b4df..a2d7303 100644 (file)
@@ -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;