Cast a malloc returned type to silence a warning
[Project_algorithmic_C.git] / lib / debug.c
index c7f4dfb48635cd174290557a6397c9d4c3938c62..e6631c6462592998255b3f784d5959f20eb4ff1f 100644 (file)
@@ -19,9 +19,9 @@
 #include <string.h>
 
 #include "othello.h"
-#include "constants.h"
 #include "debug.h"
 
+#if DEBUG
 void display_array(int base_y, int base_x, unsigned int pawn_array[board_size][board_size]) {
 
     for (int i = 1; i <= board_size; i++) {
@@ -32,3 +32,6 @@ void display_array(int base_y, int base_x, unsigned int pawn_array[board_size][b
         }
     }
 }
+#else
+void display_array(int base_y, int base_x, unsigned int pawn_array[board_size][board_size]) { }
+#endif /* DEBUG */