Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/fstyp XXX: Teach lint about _Static_assert...



details:   https://anonhg.NetBSD.org/src/rev/dfe08093e22d
branches:  trunk
changeset: 1023598:dfe08093e22d
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Sep 17 14:49:03 2021 +0000

description:
XXX: Teach lint about _Static_assert...

diffstat:

 usr.sbin/fstyp/exfat.c   |  8 ++++++--
 usr.sbin/fstyp/hfsplus.c |  6 ++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (66 lines):

diff -r 1d1c2c00cb27 -r dfe08093e22d usr.sbin/fstyp/exfat.c
--- a/usr.sbin/fstyp/exfat.c    Fri Sep 17 14:48:31 2021 +0000
+++ b/usr.sbin/fstyp/exfat.c    Fri Sep 17 14:49:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exfat.c,v 1.4 2021/01/24 14:37:32 tkusumi Exp $        */
+/*     $NetBSD: exfat.c,v 1.5 2021/09/17 14:49:03 christos Exp $       */
 
 /*
  * Copyright (c) 2017 Conrad Meyer <cem%FreeBSD.org@localhost>
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: exfat.c,v 1.4 2021/01/24 14:37:32 tkusumi Exp $");
+__RCSID("$NetBSD: exfat.c,v 1.5 2021/09/17 14:49:03 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -116,7 +116,9 @@
 #define        xde_set_chksum          u.xde_primary_.xde_set_chksum_
 #define        xde_prim_flags          u.xde_primary_.xde_prim_flags_
 #define        xde_sec_flags           u.xde_secondary_.xde_sec_flags_
+#ifndef __lint__
 _Static_assert(sizeof(struct exfat_dirent) == 32, "spec");
+#endif
 
 struct exfat_de_label {
        uint8_t         xdel_type;      /* XDE_TYPE_VOL_LABEL */
@@ -124,7 +126,9 @@
        uint16_t        xdel_vol_lbl[11];
        uint8_t         xdel_reserved[8];
 } __packed;
+#ifndef __lint__
 _Static_assert(sizeof(struct exfat_de_label) == 32, "spec");
+#endif
 
 #define        MAIN_BOOT_REGION_SECT   0
 #define        BACKUP_BOOT_REGION_SECT 12
diff -r 1d1c2c00cb27 -r dfe08093e22d usr.sbin/fstyp/hfsplus.c
--- a/usr.sbin/fstyp/hfsplus.c  Fri Sep 17 14:48:31 2021 +0000
+++ b/usr.sbin/fstyp/hfsplus.c  Fri Sep 17 14:49:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hfsplus.c,v 1.1 2019/12/27 11:06:23 tkusumi Exp $      */
+/*     $NetBSD: hfsplus.c,v 1.2 2021/09/17 14:49:03 christos Exp $     */
 /*
  * Copyright (c) 2019 Conrad Meyer <cem%FreeBSD.org@localhost>.  All rights reserved.
  *
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: hfsplus.c,v 1.1 2019/12/27 11:06:23 tkusumi Exp $");
+__RCSID("$NetBSD: hfsplus.c,v 1.2 2021/09/17 14:49:03 christos Exp $");
 
 #include <assert.h>
 #include <err.h>
@@ -96,7 +96,9 @@
        hfsp_fork_data  hp_attributesFile;
        hfsp_fork_data  hp_startupFile;
 };
+#ifndef __lint__
 _Static_assert(sizeof(struct hfsp_vol_hdr) == 512, "");
+#endif
 
 int
 fstyp_hfsp(FILE *fp, char *label, size_t size)



Home | Main Index | Thread Index | Old Index