Module Name:    src
Committed By:   jakllsch
Date:           Sun Apr  6 19:18:00 UTC 2014

Modified Files:
        src/sys/arch/i386/stand/lib: exec.c

Log Message:
Misc WARNS=4 fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/i386/stand/lib/exec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/lib/exec.c
diff -u src/sys/arch/i386/stand/lib/exec.c:1.58 src/sys/arch/i386/stand/lib/exec.c:1.59
--- src/sys/arch/i386/stand/lib/exec.c:1.58	Fri Jan 10 17:40:51 2014
+++ src/sys/arch/i386/stand/lib/exec.c	Sun Apr  6 19:18:00 2014
@@ -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 @@ out:
 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 @@ module_path(boot_module_t *bm, const cha
 	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 @@ module_init(const char *kernel_path)
 	char kdev[64];
 	char *buf;
 	boot_module_t *bm;
-	size_t len;
+	ssize_t len;
 	off_t off;
 	int err, fd, nfail = 0;
 

Reply via email to