Shut up some boring old cpu 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 56
diff --git a/driver-cpu.c b/driver-cpu.c
index 7390dfc..a4b8df2 100644
--- a/driver-cpu.c
+++ b/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(int __maybe_unused id, int __maybe_unused cpu)
{
}
#endif
@@ -778,7 +778,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(struct thr_info __maybe_unused *thr)
{
return 0xffff;
}
diff --git a/sha256_4way.c b/sha256_4way.c
index d7d03ac..c99ba62 100644
--- a/sha256_4way.c
+++ b/sha256_4way.c
@@ -47,11 +47,11 @@ static inline __m128i Maj(const __m128i b, const __m128i c, const __m128i d) {
return _mm_xor_si128(_mm_xor_si128(_mm_and_si128(b,c),_mm_and_si128(b,d)),_mm_and_si128(c,d));
}
-static __attribute__((always_inline)) __m128i ROTR(__m128i x, const int n) {
+static inline __m128i ROTR(__m128i x, const int n) {
return _mm_or_si128(_mm_srli_epi32(x, n),_mm_slli_epi32(x, 32 - n));
}
-static __attribute__((always_inline)) __m128i SHR(__m128i x, const int n) {
+static inline __m128i SHR(__m128i x, const int n) {
return _mm_srli_epi32(x, n);
}
diff --git a/sha256_via.c b/sha256_via.c
index 05fdb3e..c58ba69 100644
--- a/sha256_via.c
+++ b/sha256_via.c
@@ -19,9 +19,9 @@ static void via_sha256(void *hash, void *buf, unsigned len)
:"memory");
}
-bool scanhash_via(struct thr_info*thr, const unsigned char *pmidstate,
+bool scanhash_via(struct thr_info*thr, const unsigned char __maybe_unused *pmidstate,
unsigned char *data_inout,
- unsigned char *phash1, unsigned char *phash,
+ unsigned char __maybe_unused *phash1, unsigned char __maybe_unused *phash,
const unsigned char *target,
uint32_t max_nonce, uint32_t *last_nonce,
uint32_t n)