Browse Source

Bugfix: slay a variety of warnings

Luke Dashjr 13 years ago
parent
commit
4eb23c7ea3
4 changed files with 6 additions and 6 deletions
  1. 3 3
      adl.h
  2. 1 1
      cgminer.c
  3. 1 1
      driver-opencl.c
  4. 1 1
      miner.h

+ 3 - 3
adl.h

@@ -21,8 +21,8 @@ void gpu_autotune(int gpu, enum dev_enable *denable);
 void clear_adl(int nDevs);
 void clear_adl(int nDevs);
 #else /* HAVE_ADL */
 #else /* HAVE_ADL */
 #define adl_active (0)
 #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
 #endif
 #endif

+ 1 - 1
cgminer.c

@@ -3797,7 +3797,7 @@ void *miner_thread(void *userdata)
 	unsigned long long hashes_done = 0;
 	unsigned long long hashes_done = 0;
 	unsigned long long hashes;
 	unsigned long long hashes;
 	struct work *work = make_work();
 	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;
 	unsigned const long request_nonce = MAXTHREADS / 3 * 2;
 	bool requested = false;
 	bool requested = false;
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);

+ 1 - 1
driver-opencl.c

@@ -1110,7 +1110,7 @@ out:
 	return NULL;
 	return NULL;
 }
 }
 #else
 #else
-void *reinit_gpu(void *userdata)
+void *reinit_gpu(__maybe_unused void *userdata)
 {
 {
 	return NULL;
 	return NULL;
 }
 }

+ 1 - 1
miner.h

@@ -336,7 +336,7 @@ struct cgpu_info {
 	int virtual_adl;
 	int virtual_adl;
 	int intensity;
 	int intensity;
 	bool dynamic;
 	bool dynamic;
-	char *kname;
+	const char *kname;
 #ifdef HAVE_OPENCL
 #ifdef HAVE_OPENCL
 	cl_uint vwidth;
 	cl_uint vwidth;
 	size_t work_size;
 	size_t work_size;