Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/file/dist/src fix lint fixes



details:   https://anonhg.NetBSD.org/src/rev/f8ee99352501
branches:  trunk
changeset: 445235:f8ee99352501
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 19 00:32:47 2018 +0000

description:
fix lint fixes

diffstat:

 external/bsd/file/dist/src/file.h      |  4 ++--
 external/bsd/file/dist/src/readelf.c   |  6 +++---
 external/bsd/file/dist/src/softmagic.c |  6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 6f87c0a44ec3 -r f8ee99352501 external/bsd/file/dist/src/file.h
--- a/external/bsd/file/dist/src/file.h Fri Oct 19 00:24:57 2018 +0000
+++ b/external/bsd/file/dist/src/file.h Fri Oct 19 00:32:47 2018 +0000
@@ -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 @@
 #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
 
diff -r 6f87c0a44ec3 -r f8ee99352501 external/bsd/file/dist/src/readelf.c
--- a/external/bsd/file/dist/src/readelf.c      Fri Oct 19 00:24:57 2018 +0000
+++ b/external/bsd/file/dist/src/readelf.c      Fri Oct 19 00:32:47 2018 +0000
@@ -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 @@
                        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;
                        }
diff -r 6f87c0a44ec3 -r f8ee99352501 external/bsd/file/dist/src/softmagic.c
--- a/external/bsd/file/dist/src/softmagic.c    Fri Oct 19 00:24:57 2018 +0000
+++ b/external/bsd/file/dist/src/softmagic.c    Fri Oct 19 00:32:47 2018 +0000
@@ -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 @@
                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:



Home | Main Index | Thread Index | Old Index