Browse Source

Fix missing field initialisers warnings.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
111238489f
  1. 2
      bitforce.c
  2. 4
      cgminer.c
  3. 6
      logging.c
  4. 6
      util.c

2
bitforce.c

@ -192,7 +192,7 @@ static bool bitforce_thread_prepare(struct thr_info *thr) @@ -192,7 +192,7 @@ static bool bitforce_thread_prepare(struct thr_info *thr)
return true;
}
static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint64_t max_nonce)
static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint64_t __maybe_unused max_nonce)
{
struct cgpu_info *bitforce = thr->cgpu;
int fdDev = bitforce->device_fd;

4
cgminer.c

@ -1701,7 +1701,7 @@ void kill_work(void) @@ -1701,7 +1701,7 @@ void kill_work(void)
void quit(int status, const char *format, ...);
static void sighandler(int sig)
static void sighandler(int __maybe_unused sig)
{
/* Restore signal handlers so we can still quit if kill_work fails */
sigaction(SIGTERM, &termhandler, NULL);
@ -3073,7 +3073,7 @@ static bool get_work(struct work *work, bool requested, struct thr_info *thr, @@ -3073,7 +3073,7 @@ static bool get_work(struct work *work, bool requested, struct thr_info *thr,
const int thr_id)
{
bool newreq = false, ret = false;
struct timespec abstime = {};
struct timespec abstime = {0, 0};
struct timeval now;
struct work *work_heap;
struct pool *pool;

6
logging.c

@ -25,7 +25,7 @@ void vapplog(int prio, const char *fmt, va_list ap) @@ -25,7 +25,7 @@ void vapplog(int prio, const char *fmt, va_list ap)
else if (opt_log_output || prio <= LOG_NOTICE) {
char *f;
int len;
struct timeval tv = { };
struct timeval tv = {0, 0};
struct tm *tm;
gettimeofday(&tv, NULL);
@ -79,7 +79,7 @@ void applog(int prio, const char *fmt, ...) @@ -79,7 +79,7 @@ void applog(int prio, const char *fmt, ...)
* generic log function used by priority specific ones
* equals vapplog() without additional priority checks
*/
static void log_generic(int prio, const char *fmt, va_list ap)
static void __maybe_unused log_generic(int prio, const char *fmt, va_list ap)
{
extern bool use_curses;
#ifdef HAVE_SYSLOG_H
@ -92,7 +92,7 @@ static void log_generic(int prio, const char *fmt, va_list ap) @@ -92,7 +92,7 @@ static void log_generic(int prio, const char *fmt, va_list ap)
else {
char *f;
int len;
struct timeval tv = { };
struct timeval tv = {0, 0};
struct tm *tm;
gettimeofday(&tv, NULL);

6
util.c

@ -254,14 +254,14 @@ json_t *json_rpc_call(CURL *curl, const char *url, @@ -254,14 +254,14 @@ json_t *json_rpc_call(CURL *curl, const char *url,
{
json_t *val, *err_val, *res_val;
int rc;
struct data_buffer all_data = { };
struct data_buffer all_data = {NULL, 0};
struct upload_buffer upload_data;
json_error_t err = { };
json_error_t err = {0, 0, 0, "", ""};
struct curl_slist *headers = NULL;
char len_hdr[64], user_agent_hdr[128];
char curl_err_str[CURL_ERROR_SIZE];
long timeout = longpoll ? (60 * 60) : 60;
struct header_info hi = { };
struct header_info hi = {NULL, false, NULL};
bool probing = false;
/* it is assumed that 'curl' is freshly [re]initialized at this pt */

Loading…
Cancel
Save