mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-14 15:11:56 +00:00
Silence unused parameter warnings.
This commit is contained in:
parent
294ac0b6bf
commit
36d2fa485c
13
cgminer.c
13
cgminer.c
@ -854,7 +854,7 @@ static char *parse_config(json_t *config, bool fileconf)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *load_config(const char *arg, void *unused)
|
static char *load_config(const char *arg, void __maybe_unused *unused)
|
||||||
{
|
{
|
||||||
json_error_t err;
|
json_error_t err;
|
||||||
json_t *config;
|
json_t *config;
|
||||||
@ -2599,7 +2599,7 @@ retry:
|
|||||||
opt_loginput = false;
|
opt_loginput = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *input_thread(void *userdata)
|
static void *input_thread(void __maybe_unused *userdata)
|
||||||
{
|
{
|
||||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||||
|
|
||||||
@ -2979,7 +2979,8 @@ static void roll_work(struct work *work)
|
|||||||
/* Recycle the work at a higher starting res_nonce if we know the thread we're
|
/* Recycle the work at a higher starting res_nonce if we know the thread we're
|
||||||
* giving it to will not finish scanning it. We keep the master copy to be
|
* giving it to will not finish scanning it. We keep the master copy to be
|
||||||
* recycled more rapidly and discard the clone to avoid repeating work */
|
* recycled more rapidly and discard the clone to avoid repeating work */
|
||||||
static bool divide_work(struct timeval *now, struct work *work, uint32_t hash_div)
|
static bool divide_work(struct timeval __maybe_unused *now, struct work *work,
|
||||||
|
uint32_t __maybe_unused hash_div)
|
||||||
{
|
{
|
||||||
if (can_roll(work) && should_roll(work)) {
|
if (can_roll(work) && should_roll(work)) {
|
||||||
roll_work(work);
|
roll_work(work);
|
||||||
@ -3183,7 +3184,7 @@ bool submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce)
|
|||||||
return submit_work_sync(thr, work);
|
return submit_work_sync(thr, work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool abandon_work(int thr_id, struct work *work, struct timeval *wdiff, uint64_t hashes)
|
static inline bool abandon_work(struct work *work, struct timeval *wdiff, uint64_t hashes)
|
||||||
{
|
{
|
||||||
if (wdiff->tv_sec > opt_scantime ||
|
if (wdiff->tv_sec > opt_scantime ||
|
||||||
work->blk.nonce >= MAXTHREADS - hashes ||
|
work->blk.nonce >= MAXTHREADS - hashes ||
|
||||||
@ -3334,7 +3335,7 @@ void *miner_thread(void *userdata)
|
|||||||
|
|
||||||
if (can_roll(work) && should_roll(work))
|
if (can_roll(work) && should_roll(work))
|
||||||
roll_work(work);
|
roll_work(work);
|
||||||
} while (!abandon_work(thr_id, work, &wdiff, hashes));
|
} while (!abandon_work(work, &wdiff, hashes));
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@ -3527,7 +3528,7 @@ void reinit_device(struct cgpu_info *cgpu)
|
|||||||
/* Makes sure the hashmeter keeps going even if mining threads stall, updates
|
/* Makes sure the hashmeter keeps going even if mining threads stall, updates
|
||||||
* the screen at regular intervals, and restarts threads if they appear to have
|
* the screen at regular intervals, and restarts threads if they appear to have
|
||||||
* died. */
|
* died. */
|
||||||
static void *watchdog_thread(void *userdata)
|
static void *watchdog_thread(void __maybe_unused *userdata)
|
||||||
{
|
{
|
||||||
const unsigned int interval = 3;
|
const unsigned int interval = 3;
|
||||||
static struct timeval rotate_tv;
|
static struct timeval rotate_tv;
|
||||||
|
@ -1081,13 +1081,14 @@ static void opencl_free_work(struct thr_info *thr, struct work *work)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool opencl_prepare_work(struct thr_info *thr, struct work *work)
|
static bool opencl_prepare_work(struct thr_info __maybe_unused *thr, struct work *work)
|
||||||
{
|
{
|
||||||
precalc_hash(&work->blk, (uint32_t *)(work->midstate), (uint32_t *)(work->data + 64));
|
precalc_hash(&work->blk, (uint32_t *)(work->midstate), (uint32_t *)(work->data + 64));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t opencl_scanhash(struct thr_info *thr, struct work *work, uint64_t max_nonce)
|
static uint64_t opencl_scanhash(struct thr_info *thr, struct work *work,
|
||||||
|
uint64_t __maybe_unused max_nonce)
|
||||||
{
|
{
|
||||||
const int thr_id = thr->id;
|
const int thr_id = thr->id;
|
||||||
struct opencl_thread_data *thrdata = thr->cgpu_data;
|
struct opencl_thread_data *thrdata = thr->cgpu_data;
|
||||||
|
3
util.c
3
util.c
@ -239,7 +239,8 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CURL_HAS_SOCKOPT
|
#ifdef CURL_HAS_SOCKOPT
|
||||||
int json_rpc_call_sockopt_cb(void *userdata, curl_socket_t fd, curlsocktype purpose)
|
int json_rpc_call_sockopt_cb(void __maybe_unused *userdata, curl_socket_t fd,
|
||||||
|
curlsocktype __maybe_unused purpose)
|
||||||
{
|
{
|
||||||
int keepalive = 1;
|
int keepalive = 1;
|
||||||
int tcp_keepcnt = 5;
|
int tcp_keepcnt = 5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user