Browse Source

api.c remove compile warnings

Kano 13 years ago
parent
commit
a2cc588c51
1 changed files with 6 additions and 0 deletions
  1. 6 0
      api.c

+ 6 - 0
api.c

@@ -168,9 +168,11 @@ static const char GPUSEP = ',';
 
 
 static const char *APIVERSION = "1.19";
 static const char *APIVERSION = "1.19";
 static const char *DEAD = "Dead";
 static const char *DEAD = "Dead";
+#if defined(HAVE_OPENCL) || defined(HAVE_AN_FPGA)
 static const char *SICK = "Sick";
 static const char *SICK = "Sick";
 static const char *NOSTART = "NoStart";
 static const char *NOSTART = "NoStart";
 static const char *INIT = "Initialising";
 static const char *INIT = "Initialising";
+#endif
 static const char *DISABLED = "Disabled";
 static const char *DISABLED = "Disabled";
 static const char *ALIVE = "Alive";
 static const char *ALIVE = "Alive";
 static const char *REJECTING = "Rejecting";
 static const char *REJECTING = "Rejecting";
@@ -571,7 +573,9 @@ struct CODES {
 
 
 static int my_thr_id = 0;
 static int my_thr_id = 0;
 static bool bye;
 static bool bye;
+#if defined(HAVE_OPENCL) || defined(HAVE_AN_FPGA)
 static bool ping = true;
 static bool ping = true;
+#endif
 
 
 // Used to control quit restart access to shutdown variables
 // Used to control quit restart access to shutdown variables
 static pthread_mutex_t quit_restart_lock;
 static pthread_mutex_t quit_restart_lock;
@@ -1292,6 +1296,7 @@ static void minerconfig(__maybe_unused SOCKETTYPE c, __maybe_unused char *param,
 	strcat(io_buffer, buf);
 	strcat(io_buffer, buf);
 }
 }
 
 
+#if defined(HAVE_OPENCL) || defined(HAVE_AN_FPGA)
 static const char *status2str(enum alive status)
 static const char *status2str(enum alive status)
 {
 {
 	switch (status) {
 	switch (status) {
@@ -1309,6 +1314,7 @@ static const char *status2str(enum alive status)
 			return UNKNOWN;
 			return UNKNOWN;
 	}
 	}
 }
 }
+#endif
 
 
 #ifdef HAVE_OPENCL
 #ifdef HAVE_OPENCL
 static void gpustatus(int gpu, bool isjson)
 static void gpustatus(int gpu, bool isjson)