1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

Convert unsigned size_ts to ints for parsing avalon messages.

This commit is contained in:
Con Kolivas 2013-05-26 01:17:05 +10:00
parent bb06c2f01b
commit ab73935875

View File

@ -617,9 +617,9 @@ static void avalon_update_temps(struct cgpu_info *avalon, struct avalon_info *in
struct avalon_result *ar);
static void avalon_parse_results(struct cgpu_info *avalon, struct avalon_info *info,
struct thr_info *thr, char *buf, size_t *offset)
struct thr_info *thr, char *buf, int *offset)
{
size_t i, spare = AVALON_READ_SIZE - *offset;
int i, spare = AVALON_READ_SIZE - *offset;
bool found = false;
for (i = 0; i <= spare; i++) {
@ -668,7 +668,7 @@ static void *avalon_get_results(void *userdata)
char readbuf[AVALON_READBUF_SIZE];
struct thr_info *thr = info->thr;
int fd = avalon->device_fd;
size_t offset = 0;
int offset = 0;
pthread_detach(pthread_self());
@ -706,7 +706,7 @@ static void *avalon_get_results(void *userdata)
memcpy(&readbuf[offset], buf, ret);
offset += ret;
while (offset >= AVALON_READ_SIZE)
while (offset >= (int)AVALON_READ_SIZE)
avalon_parse_results(avalon, info, thr, readbuf, &offset);
}
return NULL;