Bugfix: slay a variety of 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 43 44 45 46 47 48 49 50 51 52 53 54 55
diff --git a/adl.h b/adl.h
index f48c420..ca67550 100644
--- a/adl.h
+++ b/adl.h
@@ -21,8 +21,8 @@ void gpu_autotune(int gpu, enum dev_enable *denable);
void clear_adl(int nDevs);
#else /* HAVE_ADL */
#define adl_active (0)
-static inline void init_adl(int nDevs) {}
-static inline void change_gpusettings(int gpu) { }
-static inline void clear_adl(int nDevs) {}
+static inline void init_adl(__maybe_unused int nDevs) {}
+static inline void change_gpusettings(__maybe_unused int gpu) { }
+static inline void clear_adl(__maybe_unused int nDevs) {}
#endif
#endif
diff --git a/cgminer.c b/cgminer.c
index 19ceea1..b32184e 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -3797,7 +3797,7 @@ void *miner_thread(void *userdata)
unsigned long long hashes_done = 0;
unsigned long long hashes;
struct work *work = make_work();
- unsigned const int request_interval = opt_scantime * 2 / 3 ? : 1;
+ const time_t request_interval = opt_scantime * 2 / 3 ? : 1;
unsigned const long request_nonce = MAXTHREADS / 3 * 2;
bool requested = false;
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
diff --git a/driver-opencl.c b/driver-opencl.c
index dd15687..521a063 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1110,7 +1110,7 @@ out:
return NULL;
}
#else
-void *reinit_gpu(void *userdata)
+void *reinit_gpu(__maybe_unused void *userdata)
{
return NULL;
}
diff --git a/miner.h b/miner.h
index 31f68db..49c27b4 100644
--- a/miner.h
+++ b/miner.h
@@ -336,7 +336,7 @@ struct cgpu_info {
int virtual_adl;
int intensity;
bool dynamic;
- char *kname;
+ const char *kname;
#ifdef HAVE_OPENCL
cl_uint vwidth;
size_t work_size;