Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/stand/lib Misc WARNS=4 fixes.



details:   https://anonhg.NetBSD.org/src/rev/a71344bd9437
branches:  trunk
changeset: 795308:a71344bd9437
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sun Apr 06 19:18:00 2014 +0000

description:
Misc WARNS=4 fixes.

diffstat:

 sys/arch/i386/stand/lib/exec.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 3666c79cc31f -r a71344bd9437 sys/arch/i386/stand/lib/exec.c
--- a/sys/arch/i386/stand/lib/exec.c    Sun Apr 06 19:11:26 2014 +0000
+++ b/sys/arch/i386/stand/lib/exec.c    Sun Apr 06 19:18:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec.c,v 1.58 2014/01/10 17:40:51 jakllsch Exp $        */
+/*     $NetBSD: exec.c,v 1.59 2014/04/06 19:18:00 jakllsch Exp $        */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -418,7 +418,7 @@
 static void
 extract_device(const char *path, char *buf, size_t buflen)
 {
-       int i;
+       size_t i;
 
        if (strchr(path, ':') != NULL) {
                for (i = 0; i < buflen - 2 && path[i] != ':'; i++)
@@ -440,7 +440,7 @@
        for (name2 = name; *name2; ++name2) {
                if (*name2 == ' ' || *name2 == '\t') {
                        strlcpy(name_buf, name, sizeof(name_buf));
-                       if (name2 - name < sizeof(name_buf))
+                       if ((uintptr_t)name2 - (uintptr_t)name < sizeof(name_buf))
                                name_buf[name2 - name] = '\0';
                        name = name_buf;
                        break;
@@ -504,7 +504,7 @@
        char kdev[64];
        char *buf;
        boot_module_t *bm;
-       size_t len;
+       ssize_t len;
        off_t off;
        int err, fd, nfail = 0;
 



Home | Main Index | Thread Index | Old Index