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 typedef struct __packed



details:   https://anonhg.NetBSD.org/src/rev/3081f1272dc6
branches:  trunk
changeset: 747813:3081f1272dc6
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 02 20:45:06 2009 +0000

description:
fix typedef struct __packed

diffstat:

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

diffs (51 lines):

diff -r 0b1ae5b53a3a -r 3081f1272dc6 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Fri Oct 02 20:31:19 2009 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Fri Oct 02 20:45:06 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.48 2009/10/02 19:01:13 christos Exp $ */
+/* $NetBSD: decl.c,v 1.49 2009/10/02 20:45:06 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.48 2009/10/02 19:01:13 christos Exp $");
+__RCSID("$NetBSD: decl.c,v 1.49 2009/10/02 20:45:06 christos Exp $");
 #endif
 
 #include <sys/param.h>
@@ -254,8 +254,10 @@
 addtype(type_t *tp)
 {
        tspec_t t;
-//     char buf[1024];
-// printf("addtype %s\n", tyname(buf, sizeof(buf), tp));
+#ifdef DEBUG
+       char buf[1024];
+       printf("addtype %s\n", tyname(buf, sizeof(buf), tp));
+#endif
        if (tp->t_typedef) {
                if (dcs->d_type != NULL || dcs->d_atyp != NOTSPEC ||
                    dcs->d_lmod != NOTSPEC || dcs->d_smod != NOTSPEC) {
@@ -516,9 +518,9 @@
 void
 addpacked(void)
 {
-       if (dcs->d_type == NULL) {
+       if (dcs->d_type == NULL)
                dcs->d_ispacked = 1;
-       } else
+       else
                setpackedsize(dcs->d_type);
 }
 
@@ -1639,6 +1641,7 @@
                tag->s_scl = scl;
                tag->s_blklev = -1;
                tag->s_type = tp = getblk(sizeof (type_t));
+               tp->t_ispacked = dcs->d_ispacked;
                dcs->d_nxt->d_nedecl = 1;
        }
 



Home | Main Index | Thread Index | Old Index