From d2709736e5e0454abc2405dc58e8a243f82e8507 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Tue, 22 Jul 2025 05:51:36 +1000 Subject: [PATCH] Typecast unused returns as (void) --- fs_net.c | 2 +- temu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs_net.c b/fs_net.c index c7c7484..65aec08 100644 --- a/fs_net.c +++ b/fs_net.c @@ -1815,7 +1815,7 @@ static JSONValue json_load(const char *filename) size = ftell(f); fseek(f, 0, SEEK_SET); buf = malloc(size + 1); - fread(buf, 1, size, f); + (void)(buf, 1, size, f); fclose(f); val = json_parse_value_len(buf, size); free(buf); diff --git a/temu.c b/temu.c index 7c07f3b..2ed043f 100644 --- a/temu.c +++ b/temu.c @@ -250,7 +250,7 @@ static int bf_read_async(BlockDevice *bs, for(i = 0; i < n; i++) { if (!bf->sector_table[sector_num]) { fseek(bf->f, sector_num * SECTOR_SIZE, SEEK_SET); - fread(buf, 1, SECTOR_SIZE, bf->f); + (void)fread(buf, 1, SECTOR_SIZE, bf->f); } else { memcpy(buf, bf->sector_table[sector_num], SECTOR_SIZE); } @@ -259,7 +259,7 @@ static int bf_read_async(BlockDevice *bs, } } else { fseek(bf->f, sector_num * SECTOR_SIZE, SEEK_SET); - fread(buf, 1, n * SECTOR_SIZE, bf->f); + (void)fread(buf, 1, n * SECTOR_SIZE, bf->f); } /* synchronous read */ return 0; @@ -357,7 +357,7 @@ static void tun_write_packet(EthernetDevice *net, const uint8_t *buf, int len) { TunState *s = net->opaque; - write(s->fd, buf, len); + (void)write(s->fd, buf, len); } static void tun_select_fill(EthernetDevice *net, int *pfd_max,