Browse Source

Fix warnings

Luke Dashjr 12 years ago
parent
commit
28fb8181fe
2 changed files with 3 additions and 3 deletions
  1. 1 1
      driver-icarus.c
  2. 2 2
      miner.c

+ 1 - 1
driver-icarus.c

@@ -232,7 +232,7 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
 			{
 				if (ret)
 					// work restart trigger
-					(void)read(thr->work_restart_fd, buf, read_amount);
+					IGNORE_RETURN_VALUE(read(thr->work_restart_fd, buf, read_amount));
 				ret = 0;
 			}
 		}

+ 2 - 2
miner.c

@@ -4316,7 +4316,7 @@ static void restart_threads(void)
 		fd = thr->_work_restart_fd_w;
 		thr->work_restart = true;
 		if (fd != -1)
-			(void)write(fd, "\0", 1);
+			IGNORE_RETURN_VALUE(write(fd, "\0", 1));
 	}
 
 	mutex_lock(&restart_lock);
@@ -7254,7 +7254,7 @@ static void *watchdog_thread(void __maybe_unused *userdata)
 
 		for (i = 0; i < total_devices; ++i) {
 			struct cgpu_info *cgpu = devices[i];
-			struct thr_info *thr;
+			struct thr_info *thr = cgpu->thr[0];
 			for (int thrid = 0; thrid < cgpu->threads; ++thrid) {
 				thr = cgpu->thr[thrid];
 				if (!thr->q->frozen)