Module Name: src Committed By: tkusumi Date: Wed Jan 1 11:46:43 UTC 2020
Modified Files: src/usr.sbin/fstyp: hammer2.c Log Message: fstyp: Fix build failure on i386 http://releng.netbsd.org/b5reports/i386/commits-2020.01.html#2020.01.01.10.13.16 Explicitly cast to size_t. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/fstyp/hammer2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/fstyp/hammer2.c diff -u src/usr.sbin/fstyp/hammer2.c:1.1 src/usr.sbin/fstyp/hammer2.c:1.2 --- src/usr.sbin/fstyp/hammer2.c:1.1 Wed Jan 1 08:56:41 2020 +++ src/usr.sbin/fstyp/hammer2.c Wed Jan 1 11:46:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hammer2.c,v 1.1 2020/01/01 08:56:41 tkusumi Exp $ */ +/* $NetBSD: hammer2.c,v 1.2 2020/01/01 11:46:43 tkusumi Exp $ */ /*- * Copyright (c) 2017-2019 The DragonFly Project @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hammer2.c,v 1.1 2020/01/01 08:56:41 tkusumi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hammer2.c,v 1.2 2020/01/01 11:46:43 tkusumi Exp $"); #include <stdio.h> #include <stdlib.h> @@ -80,7 +80,7 @@ read_media(FILE *fp, const hammer2_block io_off = bref->data_off & ~HAMMER2_OFF_MASK_RADIX; io_base = io_off & ~(hammer2_off_t)(HAMMER2_MINIOSIZE - 1); - boff = io_off - io_base; + boff = (size_t)(io_off - io_base); io_bytes = HAMMER2_MINIOSIZE; while (io_bytes + boff < bytes)