Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/fstyp fstyp: Fix build failure on i386



details:   https://anonhg.NetBSD.org/src/rev/2b764f900689
branches:  trunk
changeset: 968047:2b764f900689
user:      tkusumi <tkusumi%NetBSD.org@localhost>
date:      Wed Jan 01 11:46:43 2020 +0000

description:
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.

diffstat:

 usr.sbin/fstyp/hammer2.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r de99b9e64ba8 -r 2b764f900689 usr.sbin/fstyp/hammer2.c
--- a/usr.sbin/fstyp/hammer2.c  Wed Jan 01 11:21:15 2020 +0000
+++ b/usr.sbin/fstyp/hammer2.c  Wed Jan 01 11:46:43 2020 +0000
@@ -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 @@
 
        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)



Home | Main Index | Thread Index | Old Index