From 606f7e2750dab73acd24f673d1725543fa53766c Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 3 Apr 2014 21:11:47 +0000 Subject: [PATCH] gridseed: Fix warnings --- driver-gridseed.c | 6 +----- gc3355.c | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/driver-gridseed.c b/driver-gridseed.c index beb557dfec..ecad56943e 100644 --- a/driver-gridseed.c +++ b/driver-gridseed.c @@ -146,7 +146,7 @@ bool gridseed_set_queue_full(const struct cgpu_info * const device, int needwork static bool gridseed_thread_init(struct thr_info *master_thr) { - struct cgpu_info * const device = master_thr->cgpu, *proc; + struct cgpu_info * const device = master_thr->cgpu; gridseed_set_queue_full(device, 0); timer_set_now(&master_thr->tv_poll); @@ -201,7 +201,6 @@ bool gridseed_set_queue_full(const struct cgpu_info * const device, int needwork static bool gridseed_send_work(const struct cgpu_info * const device, struct work *work) { - struct gc3355_orb_info * const info = device->device_data; int work_size = opt_scrypt ? 156 : 52; unsigned char cmd[work_size]; @@ -356,12 +355,10 @@ static void gridseed_poll(struct thr_info * const master_thr) { struct cgpu_info * const device = master_thr->cgpu; - int fd = device->device_fd; unsigned char buf[GC3355_READ_SIZE]; int read = 0; struct timeval tv_timeout; timer_set_delay_from_now(&tv_timeout, GRIDSEED_LONG_WORK_DELAY_MS * 1000); // X MS - bool timeout = false; while (!master_thr->work_restart && (read = gc3355_read(device->device_fd, (char *)buf, GC3355_READ_SIZE)) > 0) { @@ -389,7 +386,6 @@ void gridseed_poll(struct thr_info * const master_thr) { // allow work to be sent to the device applog(LOG_DEBUG, "%s poll: timeout met", device->dev_repr); - timeout = true; break; } } diff --git a/gc3355.c b/gc3355.c index 6796f33b1e..acfd769971 100644 --- a/gc3355.c +++ b/gc3355.c @@ -390,7 +390,8 @@ void gc3355_log_protocol(int fd, const char *buf, size_t size, const char *prefi { char hex[(size * 2) + 1]; bin2hex(hex, buf, size); - applog(LOG_DEBUG, "%s fd=%d: DEVPROTO: %s(%3lu) %s", GC3355_CHIP_NAME, fd, prefix, size, hex); + applog(LOG_DEBUG, "%s fd=%d: DEVPROTO: %s(%3lu) %s", + GC3355_CHIP_NAME, fd, prefix, (unsigned long)size, hex); } int gc3355_read(int fd, char *buf, size_t size) @@ -727,9 +728,6 @@ void gc3355_sha2_prepare_work(unsigned char cmd[52], struct work *work, bool sim uint32_t gc3355_get_firmware_version(int fd) { - unsigned char detect_data[16]; - int size = sizeof(detect_data); - gc3355_send_cmds(fd, firmware_request_cmd); char buf[GC3355_READ_SIZE];