erofs-utils: mount: fix type mismatches causing compilation errors
PATCH 1/1 erofs-utils: mount: fix type mismatches causing compilation errors
In file included from ../include/erofs/config.h:15,
from main.c:14:
main.c: In function ‘erofsmount_tarindex_pread’:../include/erofs/defs.h:148:24: error: comparison of distinct pointer types lacks a cast [-Werror]
148 | (void) (&_min1 == &_min2); \
| ^~
main.c:380:30: note: in expansion of macro ‘min’
380 | index_part = min(count, tp->tarindex_size - offset);
| ^~~
Fixes da1fb2864fbb ("erofs-utils: mount: add support for standard OCI targz blob access")
Signed-off-by Gao Xiang <[email protected]>
--- mount/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mount/main.c +1 -1
@@ -376,7 +376,7 @@ static ssize_t erofsmount_tarindex_pread(struct erofs_vfile *vf, void *buf, remote_offset = offset - tp->tarindex_size; index_part =0 ; }else { - index_part =min (count, tp->tarindex_size - offset); + index_part =min_t (u64, count, tp->tarindex_size - offset); remote_offset =0 ; } tardata_part = count - index_part;
Signature · 1 line
2.43.5