api.c remove compile warnings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
diff --git a/api.c b/api.c
index ddd938a..01660af 100644
--- a/api.c
+++ b/api.c
@@ -168,9 +168,11 @@ static const char GPUSEP = ',';
static const char *APIVERSION = "1.19";
static const char *DEAD = "Dead";
+#if defined(HAVE_OPENCL) || defined(HAVE_AN_FPGA)
static const char *SICK = "Sick";
static const char *NOSTART = "NoStart";
static const char *INIT = "Initialising";
+#endif
static const char *DISABLED = "Disabled";
static const char *ALIVE = "Alive";
static const char *REJECTING = "Rejecting";
@@ -571,7 +573,9 @@ struct CODES {
static int my_thr_id = 0;
static bool bye;
+#if defined(HAVE_OPENCL) || defined(HAVE_AN_FPGA)
static bool ping = true;
+#endif
// Used to control quit restart access to shutdown variables
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);
}
+#if defined(HAVE_OPENCL) || defined(HAVE_AN_FPGA)
static const char *status2str(enum alive status)
{
switch (status) {
@@ -1309,6 +1314,7 @@ static const char *status2str(enum alive status)
return UNKNOWN;
}
}
+#endif
#ifdef HAVE_OPENCL
static void gpustatus(int gpu, bool isjson)