Module Name:    src
Committed By:   christos
Date:           Fri Oct 19 00:32:47 UTC 2018

Modified Files:
        src/external/bsd/file/dist/src: file.h readelf.c softmagic.c

Log Message:
fix lint fixes


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/bsd/file/dist/src/file.h
cvs rdiff -u -r1.19 -r1.20 src/external/bsd/file/dist/src/readelf.c
cvs rdiff -u -r1.20 -r1.21 src/external/bsd/file/dist/src/softmagic.c

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

Modified files:

Index: src/external/bsd/file/dist/src/file.h
diff -u src/external/bsd/file/dist/src/file.h:1.21 src/external/bsd/file/dist/src/file.h:1.22
--- src/external/bsd/file/dist/src/file.h:1.21	Thu Oct 18 20:24:57 2018
+++ src/external/bsd/file/dist/src/file.h	Thu Oct 18 20:32:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: file.h,v 1.21 2018/10/19 00:24:57 christos Exp $	*/
+/*	$NetBSD: file.h,v 1.22 2018/10/19 00:32:47 christos Exp $	*/
 
 /*
  * Copyright (c) Ian F. Darwin 1986-1995.
@@ -384,7 +384,7 @@ struct mlist {
 #define CCAST(T, b)	const_cast<T>(b)
 #else
 #define CAST(T, b)	((T)(b))
-#define RCAST(T, b)	((T)(void *)(b))
+#define RCAST(T, b)	((T)(uintptr_t)(b))
 #define CCAST(T, b)	((T)(uintptr_t)(b))
 #endif
 

Index: src/external/bsd/file/dist/src/readelf.c
diff -u src/external/bsd/file/dist/src/readelf.c:1.19 src/external/bsd/file/dist/src/readelf.c:1.20
--- src/external/bsd/file/dist/src/readelf.c:1.19	Thu Oct 18 20:24:57 2018
+++ src/external/bsd/file/dist/src/readelf.c	Thu Oct 18 20:32:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: readelf.c,v 1.19 2018/10/19 00:24:57 christos Exp $	*/
+/*	$NetBSD: readelf.c,v 1.20 2018/10/19 00:32:47 christos Exp $	*/
 
 /*
  * Copyright (c) Christos Zoulas 2003.
@@ -32,7 +32,7 @@
 #if 0
 FILE_RCSID("@(#)$File: readelf.c,v 1.154 2018/10/15 16:29:16 christos Exp $")
 #else
-__RCSID("$NetBSD: readelf.c,v 1.19 2018/10/19 00:24:57 christos Exp $");
+__RCSID("$NetBSD: readelf.c,v 1.20 2018/10/19 00:32:47 christos Exp $");
 #endif
 #endif
 
@@ -792,7 +792,7 @@ do_core_note(struct magic_set *ms, unsig
 			pidoff = argoff + 81 + 2;
 			if (doff + pidoff + 4 <= size) {
 				if (file_printf(ms, ", pid=%u",
-				    elf_getu32(swap, *RCAST(uint32 *, (nbuf +
+				    elf_getu32(swap, *RCAST(uint32_t *, (nbuf +
 				    doff + pidoff)))) == -1)
 					return 1;
 			}

Index: src/external/bsd/file/dist/src/softmagic.c
diff -u src/external/bsd/file/dist/src/softmagic.c:1.20 src/external/bsd/file/dist/src/softmagic.c:1.21
--- src/external/bsd/file/dist/src/softmagic.c:1.20	Thu Oct 18 20:11:48 2018
+++ src/external/bsd/file/dist/src/softmagic.c	Thu Oct 18 20:32:47 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: softmagic.c,v 1.20 2018/10/19 00:11:48 christos Exp $	*/
+/*	$NetBSD: softmagic.c,v 1.21 2018/10/19 00:32:47 christos Exp $	*/
 
 /*
  * Copyright (c) Ian F. Darwin 1986-1995.
@@ -37,7 +37,7 @@
 #if 0
 FILE_RCSID("@(#)$File: softmagic.c,v 1.271 2018/10/15 16:29:16 christos Exp $")
 #else
-__RCSID("$NetBSD: softmagic.c,v 1.20 2018/10/19 00:11:48 christos Exp $");
+__RCSID("$NetBSD: softmagic.c,v 1.21 2018/10/19 00:32:47 christos Exp $");
 #endif
 #endif	/* lint */
 
@@ -1441,7 +1441,7 @@ msetoffset(struct magic_set *ms, struct 
 		if ((size_t)-m->offset > b->elen)
 			return -1;
 		buffer_init(bb, -1, b->ebuf, b->elen);
-		ms->eoffset = ms->offset = b->elen + m->offset;
+		ms->eoffset = ms->offset = (int32_t)(b->elen + m->offset);
 	} else {
 		if (cont_level == 0) {
 normal:

Reply via email to