mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Get rid of unitialised variable warning when it's false.
This commit is contained in:
parent
b3bc506d9a
commit
c8e1026dfb
@ -2037,12 +2037,14 @@ static void push_curl_entry(struct curl_ent *ce, struct pool *pool)
|
|||||||
mutex_unlock(&pool->pool_lock);
|
mutex_unlock(&pool->pool_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ce and pool may appear uninitialised at push_curl_entry, but they're always
|
||||||
|
* set when we don't have opt_benchmark enabled */
|
||||||
static void *get_work_thread(void *userdata)
|
static void *get_work_thread(void *userdata)
|
||||||
{
|
{
|
||||||
struct workio_cmd *wc = (struct workio_cmd *)userdata;
|
struct workio_cmd *wc = (struct workio_cmd *)userdata;
|
||||||
|
struct curl_ent * uninitialised_var(ce);
|
||||||
|
struct pool * uninitialised_var(pool);
|
||||||
struct work *ret_work = make_work();
|
struct work *ret_work = make_work();
|
||||||
struct curl_ent *ce;
|
|
||||||
struct pool *pool;
|
|
||||||
int failures = 0;
|
int failures = 0;
|
||||||
|
|
||||||
pthread_detach(pthread_self());
|
pthread_detach(pthread_self());
|
||||||
|
2
miner.h
2
miner.h
@ -122,6 +122,8 @@ void *alloca (size_t);
|
|||||||
#endif
|
#endif
|
||||||
#define __maybe_unused __attribute__((unused))
|
#define __maybe_unused __attribute__((unused))
|
||||||
|
|
||||||
|
#define uninitialised_var(x) x = x
|
||||||
|
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
#define WANT_CRYPTOPP_ASM32
|
#define WANT_CRYPTOPP_ASM32
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user