source clean up. Fix compiler warning, removed unused variables, etc.
[xboard.git] / winboard / wengineo.c
index a2d77ed..ff7b3b1 100644 (file)
@@ -119,9 +119,9 @@ typedef struct {
     int an_move_count;\r
 } EngineOutputData;\r
 \r
-static VerifyDisplayMode();\r
+static void VerifyDisplayMode();\r
 static void UpdateControls( EngineOutputData * ed );\r
-static SetEngineState( int which, int state, char * state_data );\r
+static void SetEngineState( int which, int state, char * state_data );\r
 \r
 // front end\r
 static HICON LoadIconEx( int id )\r
@@ -248,9 +248,9 @@ static void ResizeWindowControls( HWND hDlg, int mode )
 {\r
     RECT rc;\r
     int headerHeight = GetHeaderHeight();\r
-    int labelHeight = GetControlHeight( hDlg, IDC_EngineLabel1 );\r
-    int labelOffset = H_MARGIN + ICON_SIZE + H_MARGIN;\r
-    int labelDeltaY = ICON_SIZE - labelHeight;\r
+//    int labelHeight = GetControlHeight( hDlg, IDC_EngineLabel1 );\r
+//    int labelOffset = H_MARGIN + ICON_SIZE + H_MARGIN;\r
+//    int labelDeltaY = ICON_SIZE - labelHeight;\r
     int clientWidth;\r
     int clientHeight;\r
     int maxControlWidth;\r
@@ -448,7 +448,7 @@ void DoClearMemo(int which)
 \r
 \r
 // back end, due to front-end wrapper for SetWindowText, and new SetIcon arguments\r
-static SetEngineState( int which, int state, char * state_data )\r
+static void SetEngineState( int which, int state, char * state_data )\r
 {\r
     int x_which = 1 - which;\r
 \r
@@ -581,6 +581,7 @@ char GetEngineColor( int which )
             result = cps->twoMachinesColor[0];\r
             result = result == 'w' ? ENGINE_COLOR_WHITE : ENGINE_COLOR_BLACK;\r
             break;\r
+        default: ; // does not happen, but suppresses pedantic warnings\r
         }\r
     }\r
 \r
@@ -618,6 +619,7 @@ static int IsEnginePondering( int which )
             if( GetEngineColor( which ) != GetActiveEngineColor() ) result = TRUE;\r
         }\r
         break;\r
+    default: ; // does not happen, but suppresses pedantic warnings\r
     }\r
 \r
     return result;\r
@@ -634,7 +636,7 @@ static void SetDisplayMode( int mode )
 }\r
 \r
 // pure back end\r
-static VerifyDisplayMode()\r
+static void VerifyDisplayMode()\r
 {\r
     int mode;\r
 \r
@@ -684,7 +686,7 @@ static void SetEngineColorIcon( int which )
 // pure back end, now SetWindowText is called via wrapper DoSetWindowText\r
 static void UpdateControls( EngineOutputData * ed )\r
 {\r
-    int isPondering = FALSE;\r
+//    int isPondering = FALSE;\r
 \r
     char s_label[MAX_NAME_LENGTH + 32];\r
     \r
@@ -727,7 +729,7 @@ static void UpdateControls( EngineOutputData * ed )
         SetEngineState( ed->which, STATE_THINKING, "" );\r
     }\r
     else if( gameMode == AnalyzeMode || gameMode == AnalyzeFile\r
-         || gameMode == IcsObserving && appData.icsEngineAnalyze) { // [HGM] ICS-analyze\r
+         || (gameMode == IcsObserving && appData.icsEngineAnalyze)) { // [HGM] ICS-analyze\r
         char buf[64];\r
         int time_secs = ed->time / 100;\r
         int time_mins = time_secs / 60;\r