Browse Source

Silence warnings when built without various drivers

Luke Dashjr 11 years ago
parent
commit
dfd89cd76d
2 changed files with 5 additions and 1 deletions
  1. 3 1
      lowlevel.h
  2. 2 0
      miner.c

+ 3 - 1
lowlevel.h

@@ -7,6 +7,8 @@
 
 #include <uthash.h>
 
+#include "miner.h"
+
 struct lowlevel_device_info;
 
 typedef bool (*lowl_found_devinfo_func_t)(struct lowlevel_device_info *, void *);
@@ -73,7 +75,7 @@ extern struct lowlevel_driver lowl_pci;
 extern struct lowlevel_driver lowl_usb;
 #else
 // Dummy definition for the various "don't warn if just a lower-level interface" checks
-static struct lowlevel_driver lowl_usb;
+static __maybe_unused struct lowlevel_driver lowl_usb;
 #endif
 #ifdef NEED_BFG_LOWL_VCOM
 extern struct lowlevel_driver lowl_vcom;

+ 2 - 0
miner.c

@@ -1750,6 +1750,7 @@ char *set_temp_target(char *arg)
 	return NULL;
 }
 
+#ifdef HAVE_OPENCL
 static
 char *set_no_opencl_binaries(__maybe_unused void * const dummy)
 {
@@ -1757,6 +1758,7 @@ char *set_no_opencl_binaries(__maybe_unused void * const dummy)
 	add_set_device_option("OCL:binary=no");
 	return NULL;
 }
+#endif
 
 static
 char *disable_pool_redirect(__maybe_unused void * const dummy)