Browse Source

Clean up compiler warnings

Luke Dashjr 13 years ago
parent
commit
95d5055a0f
2 changed files with 5 additions and 6 deletions
  1. 4 5
      miner.c
  2. 1 1
      util.c

+ 4 - 5
miner.c

@@ -1904,7 +1904,6 @@ static bool work_decode(struct pool *pool, struct work *work, json_t *val)
 
 
 	ret = true;
 	ret = true;
 
 
-out:
 	return ret;
 	return ret;
 }
 }
 
 
@@ -4227,7 +4226,7 @@ int stale_wait(unsigned int mstime, struct work*work, bool checkend)
 static void restart_threads(void)
 static void restart_threads(void)
 {
 {
 	struct pool *cp = current_pool();
 	struct pool *cp = current_pool();
-	int i, fd;
+	int i;
 	struct thr_info *thr;
 	struct thr_info *thr;
 
 
 	/* Artificially set the lagging flag to avoid pool not providing work
 	/* Artificially set the lagging flag to avoid pool not providing work
@@ -7259,7 +7258,7 @@ void print_summary(void)
 {
 {
 	struct timeval diff;
 	struct timeval diff;
 	int hours, mins, secs, i;
 	int hours, mins, secs, i;
-	double utility, efficiency = 0.0, work_util;
+	double utility, efficiency = 0.0;
 
 
 	timersub(&total_tv_end, &total_tv_start, &diff);
 	timersub(&total_tv_end, &total_tv_start, &diff);
 	hours = diff.tv_sec / 3600;
 	hours = diff.tv_sec / 3600;
@@ -7268,7 +7267,6 @@ void print_summary(void)
 
 
 	utility = total_accepted / total_secs * 60;
 	utility = total_accepted / total_secs * 60;
 	efficiency = total_bytes_xfer ? total_diff_accepted * 2048. / total_bytes_xfer : 0.0;
 	efficiency = total_bytes_xfer ? total_diff_accepted * 2048. / total_bytes_xfer : 0.0;
-	work_util = total_diff1 / total_secs * 60;
 
 
 	applog(LOG_WARNING, "\nSummary of runtime statistics:\n");
 	applog(LOG_WARNING, "\nSummary of runtime statistics:\n");
 	applog(LOG_WARNING, "Started at %s", datestamp);
 	applog(LOG_WARNING, "Started at %s", datestamp);
@@ -7562,7 +7560,8 @@ static void fork_monitor()
 
 
 #ifdef HAVE_CURSES
 #ifdef HAVE_CURSES
 void enable_curses(void) {
 void enable_curses(void) {
-	int x,y;
+	int x;
+	__maybe_unused int y;
 
 
 	lock_curses();
 	lock_curses();
 	if (curses_active) {
 	if (curses_active) {

+ 1 - 1
util.c

@@ -1514,7 +1514,7 @@ out:
 	return ret;
 	return ret;
 }
 }
 
 
-curl_socket_t grab_socket_opensocket_cb(void *clientp, curlsocktype purpose, struct curl_sockaddr *addr)
+curl_socket_t grab_socket_opensocket_cb(void *clientp, __maybe_unused curlsocktype purpose, struct curl_sockaddr *addr)
 {
 {
 	struct pool *pool = clientp;
 	struct pool *pool = clientp;
 	curl_socket_t sck = socket(addr->family, addr->socktype, addr->protocol);
 	curl_socket_t sck = socket(addr->family, addr->socktype, addr->protocol);