Browse Source

Bugfix: fix warnings in CPU miner code

Luke Dashjr 13 years ago
parent
commit
c28666371b
2 changed files with 4 additions and 4 deletions
  1. 2 2
      driver-cpu.c
  2. 2 2
      sha256_via.c

+ 2 - 2
driver-cpu.c

@@ -67,7 +67,7 @@ static inline void drop_policy(void)
 {
 }
 
-static inline void affine_to_cpu(int id, int cpu)
+static inline void affine_to_cpu(__maybe_unused int id, __maybe_unused int cpu)
 {
 }
 #endif
@@ -760,7 +760,7 @@ static bool cpu_thread_prepare(struct thr_info *thr)
 	return true;
 }
 
-static uint64_t cpu_can_limit_work(struct thr_info *thr)
+static uint64_t cpu_can_limit_work(__maybe_unused struct thr_info *thr)
 {
 	return 0xfffff;
 }

+ 2 - 2
sha256_via.c

@@ -19,9 +19,9 @@ static void via_sha256(void *hash, void *buf, unsigned len)
 		     :"memory");
 }
 
-bool scanhash_via(int thr_id, const unsigned char *pmidstate,
+bool scanhash_via(int thr_id, __maybe_unused const unsigned char *pmidstate,
 	unsigned char *data_inout,
-	unsigned char *phash1, unsigned char *phash,
+	__maybe_unused unsigned char *phash1, __maybe_unused unsigned char *phash,
 	const unsigned char *target,
 		  uint32_t max_nonce, uint32_t *last_nonce,
 		  uint32_t n)