Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/lint1 Fix return of alignof()



details:   https://anonhg.NetBSD.org/src/rev/5b48fed71575
branches:  trunk
changeset: 933996:5b48fed71575
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jun 02 21:10:07 2020 +0000

description:
Fix return of alignof()

diffstat:

 usr.bin/xlint/lint1/decl.c |  6 +++---
 usr.bin/xlint/lint1/err.c  |  6 +++---
 usr.bin/xlint/lint1/tree.c |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 1ef7a296bd4b -r 5b48fed71575 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Tue Jun 02 19:30:29 2020 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Tue Jun 02 21:10:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.70 2019/03/04 17:45:16 christos Exp $ */
+/* $NetBSD: decl.c,v 1.71 2020/06/02 21:10:07 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.70 2019/03/04 17:45:16 christos Exp $");
+__RCSID("$NetBSD: decl.c,v 1.71 2020/06/02 21:10:07 christos Exp $");
 #endif
 
 #include <sys/param.h>
@@ -1153,7 +1153,7 @@
                }
                if ((len = tp->t_flen) < 0 || len > (ssize_t)size(t)) {
                        /* illegal bit-field size */
-                       error(36);
+                       error(36, len);
                        tp->t_flen = size(t);
                } else if (len == 0 && dsym->s_name != unnamed) {
                        /* zero size bit-field */
diff -r 1ef7a296bd4b -r 5b48fed71575 usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Tue Jun 02 19:30:29 2020 +0000
+++ b/usr.bin/xlint/lint1/err.c Tue Jun 02 21:10:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: err.c,v 1.53 2018/09/07 15:16:15 christos Exp $        */
+/*     $NetBSD: err.c,v 1.54 2020/06/02 21:10:07 christos Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: err.c,v 1.53 2018/09/07 15:16:15 christos Exp $");
+__RCSID("$NetBSD: err.c,v 1.54 2020/06/02 21:10:07 christos Exp $");
 #endif
 
 #include <sys/types.h>
@@ -95,7 +95,7 @@
        "duplicate member name: %s",                                  /* 33 */
        "nonportable bit-field type",                                 /* 34 */
        "illegal bit-field type",                                     /* 35 */
-       "illegal bit-field size",                                     /* 36 */
+       "illegal bit-field size: %d",                                 /* 36 */
        "zero size bit-field",                                        /* 37 */
        "function illegal in structure or union",                     /* 38 */
        "zero sized array in struct is a C99 extension: %s",          /* 39 */
diff -r 1ef7a296bd4b -r 5b48fed71575 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Tue Jun 02 19:30:29 2020 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Tue Jun 02 21:10:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.87 2019/07/12 23:32:45 christos Exp $       */
+/*     $NetBSD: tree.c,v 1.88 2020/06/02 21:10:07 christos Exp $       */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.87 2019/07/12 23:32:45 christos Exp $");
+__RCSID("$NetBSD: tree.c,v 1.88 2020/06/02 21:10:07 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -3152,7 +3152,7 @@
        st = UINT;
 #endif
 
-       return getinode(st, (int64_t)getbound(tp));
+       return getinode(st, (int64_t)getbound(tp) / CHAR_BIT);
 }
 
 /*



Home | Main Index | Thread Index | Old Index