CVS commit: src/etc/mtree
Module Name:src Committed By: christos Date: Wed Mar 31 04:58:01 UTC 2021 Modified Files: src/etc/mtree: NetBSD.dist.base Log Message: add named plugin dir To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/etc/mtree/NetBSD.dist.base Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.233 src/etc/mtree/NetBSD.dist.base:1.234 --- src/etc/mtree/NetBSD.dist.base:1.233 Sun Jan 17 14:32:53 2021 +++ src/etc/mtree/NetBSD.dist.base Wed Mar 31 00:58:01 2021 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.233 2021/01/17 19:32:53 rillig Exp $ +# $NetBSD: NetBSD.dist.base,v 1.234 2021/03/31 04:58:01 christos Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -301,6 +301,7 @@ ./usr/libexec ./usr/libexec/ching ./usr/libexec/lpr +./usr/libexec/named ./usr/libexec/postfix ./usr/mdec ./usr/pkg ignore optional
CVS commit: src/etc/rc.d
Module Name:src Committed By: christos Date: Wed Mar 31 04:57:25 UTC 2021 Modified Files: src/etc/rc.d: named Log Message: handle copying of plugins to the chroot To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/etc/rc.d/named Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/named diff -u src/etc/rc.d/named:1.26 src/etc/rc.d/named:1.27 --- src/etc/rc.d/named:1.26 Sat Jul 4 02:24:53 2020 +++ src/etc/rc.d/named Wed Mar 31 00:57:25 2021 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: named,v 1.26 2020/07/04 06:24:53 skrll Exp $ +# $NetBSD: named,v 1.27 2021/03/31 04:57:25 christos Exp $ # # PROVIDE: named @@ -61,6 +61,18 @@ named_migrate() ) } +copy_if_newer() +{ + local chrootdir="$1" + local dir="$2" + local file="$3" + if [ ! -x "${chrootdir}${dir}/${file}" -o \ + "${chrootdir}${dir}/${file}" -ot "${dir}/${file}" ]; then + rm -f "${chrootdir}${dir}/${file}" + cp -p "${dir}/${file}" "${chrootdir}${dir}/${file}" + fi +} + named_precmd() { if [ ! -e "/etc/rndc.key" ]; then @@ -87,16 +99,19 @@ named_precmd() # case "$($command -v)" in BIND*) # 9 no group, named-xfer, or ndc + named_plugindir="/usr/libexec/named" + if [ ! -d "${named_chrootdir}${named_plugindir}" ]; then + mkdir -p -m 755 "${named_chrootdir}${named_plugindir}" + chown root:wheel "${named_chrootdir}${named_plugindir}" + fi + for p in filter-.so; do + copy_if_newer "${named_chrootdir}" \ + "${named_plugindir}" "$p" + done ;; named*) # 4 and 8 rc_flags="-g named $rc_flags" - if [ ! -x "${named_chrootdir}/usr/libexec/named-xfer" -o \ - "${named_chrootdir}/usr/libexec/named-xfer" -ot \ - /usr/libexec/named-xfer ]; then - rm -f "${named_chrootdir}/usr/libexec/named-xfer" - cp -p /usr/libexec/named-xfer \ - "${named_chrootdir}/usr/libexec" - fi + copy_if_newer "${named_chrootdir}" "/usr/libexec" "named-xfer" ln -fs "${named_chrootdir}/var/run/ndc" /var/run/ndc ;; esac
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: christos Date: Wed Mar 31 04:38:30 UTC 2021 Modified Files: src/distrib/sets/lists/base: mi Log Message: new named plugin (simon@) To generate a diff of this commit: cvs rdiff -u -r1.1274 -r1.1275 src/distrib/sets/lists/base/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1274 src/distrib/sets/lists/base/mi:1.1275 --- src/distrib/sets/lists/base/mi:1.1274 Sun Jan 17 14:32:52 2021 +++ src/distrib/sets/lists/base/mi Wed Mar 31 00:38:30 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1274 2021/01/17 19:32:52 rillig Exp $ +# $NetBSD: mi,v 1.1275 2021/03/31 04:38:30 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -1601,6 +1601,8 @@ ./usr/libexec/mail.local base-mail-bin ./usr/libexec/makekeybase-crypto-bin ./usr/libexec/makewhatis base-man-bin !makemandb +./usr/libexec/namedbase-bind-bin +./usr/libexec/named/filter-.so base-bind-bin ./usr/libexec/named-xfer base-obsolete obsolete ./usr/libexec/ntalkdbase-netutil-bin ./usr/libexec/pfspamdbase-obsolete obsolete
CVS commit: src/external/mpl/bind
Module Name:src Committed By: christos Date: Wed Mar 31 04:37:51 UTC 2021 Modified Files: src/external/mpl/bind: Makefile Added Files: src/external/mpl/bind/libexec: Makefile plugin.mk src/external/mpl/bind/libexec/filter-: Makefile Log Message: Add plugin glue (simon@) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/mpl/bind/Makefile cvs rdiff -u -r0 -r1.1 src/external/mpl/bind/libexec/Makefile \ src/external/mpl/bind/libexec/plugin.mk cvs rdiff -u -r0 -r1.1 src/external/mpl/bind/libexec/filter-/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/bind/Makefile diff -u src/external/mpl/bind/Makefile:1.1 src/external/mpl/bind/Makefile:1.2 --- src/external/mpl/bind/Makefile:1.1 Sun Aug 12 09:02:24 2018 +++ src/external/mpl/bind/Makefile Wed Mar 31 00:37:50 2021 @@ -1,5 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2018/08/12 13:02:24 christos Exp $ +# $NetBSD: Makefile,v 1.2 2021/03/31 04:37:50 christos Exp $ -SUBDIR+= lib .WAIT bin +SUBDIR+= lib .WAIT libexec bin .include Added files: Index: src/external/mpl/bind/libexec/Makefile diff -u /dev/null src/external/mpl/bind/libexec/Makefile:1.1 --- /dev/null Wed Mar 31 00:37:51 2021 +++ src/external/mpl/bind/libexec/Makefile Wed Mar 31 00:37:50 2021 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2021/03/31 04:37:50 christos Exp $ + +SUBDIR+= filter- + +.include Index: src/external/mpl/bind/libexec/plugin.mk diff -u /dev/null src/external/mpl/bind/libexec/plugin.mk:1.1 --- /dev/null Wed Mar 31 00:37:51 2021 +++ src/external/mpl/bind/libexec/plugin.mk Wed Mar 31 00:37:50 2021 @@ -0,0 +1,36 @@ +# $NetBSD: plugin.mk,v 1.1 2021/03/31 04:37:50 christos Exp $ +# +# Based on src/lib/libpam/modules/mod.mk +# NetBSD: mod.mk,v 1.17 2020/05/23 00:43:33 rin Exp + +.include "${.CURDIR}/../../Makefile.inc" + +DIST= ${IDIST}/bin/plugins +.PATH.c: ${DIST} + +LIBDIR= /usr/libexec/named + +NOLINT= # don't build a lint library +NOPROFILE= # don't build a profile library +NOPICINSTALL= # don't install _pic.a library + +# Define the shared library version here, we need these variables early for +# plugin install rules. +SHLIB_MAJOR= 0 +SHLIB_MINOR= 0 + +.include + +.if ${MKPIC} != "no" +.PRECIOUS: ${DESTDIR}${LIBDIR}/${LIB}.so +libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so +.else +libinstall:: +.endif + +.include + +${DESTDIR}${LIBDIR}/${LIB}.so: lib${LIB}.so.${SHLIB_FULLVERSION} + ${_MKTARGET_INSTALL} + ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${.ALLSRC} ${.TARGET} Index: src/external/mpl/bind/libexec/filter-/Makefile diff -u /dev/null src/external/mpl/bind/libexec/filter-/Makefile:1.1 --- /dev/null Wed Mar 31 00:37:51 2021 +++ src/external/mpl/bind/libexec/filter-/Makefile Wed Mar 31 00:37:50 2021 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile,v 1.1 2021/03/31 04:37:50 christos Exp $ + +LIB= filter- +SRCS= filter-.c + +.include "${.CURDIR}/../plugin.mk"
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Wed Mar 31 01:44:59 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: voodoofb.c Log Message: There are two interface attriubtues on this device, so we need to be explcit about it in BOTH config_found() calls. To generate a diff of this commit: cvs rdiff -u -r1.53.10.1 -r1.53.10.2 src/sys/dev/pci/voodoofb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/voodoofb.c diff -u src/sys/dev/pci/voodoofb.c:1.53.10.1 src/sys/dev/pci/voodoofb.c:1.53.10.2 --- src/sys/dev/pci/voodoofb.c:1.53.10.1 Sun Mar 21 21:09:14 2021 +++ src/sys/dev/pci/voodoofb.c Wed Mar 31 01:44:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: voodoofb.c,v 1.53.10.1 2021/03/21 21:09:14 thorpej Exp $ */ +/* $NetBSD: voodoofb.c,v 1.53.10.2 2021/03/31 01:44:59 thorpej Exp $ */ /* * Copyright (c) 2005, 2006, 2012 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.53.10.1 2021/03/21 21:09:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.53.10.2 2021/03/31 01:44:59 thorpej Exp $"); #include #include @@ -546,8 +546,12 @@ voodoofb_attach(device_t parent, device_ aa.accessops = _accessops; aa.accesscookie = >vd; - config_found(self, , wsemuldisplaydevprint, CFARG_EOL); - config_found_ia(self, "drm", aux, voodoofb_drm_print); + config_found(self, , wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); + config_found(self, aux, voodoofb_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); } static int
CVS commit: src/doc
Module Name:src Committed By: christos Date: Tue Mar 30 23:31:53 UTC 2021 Modified Files: src/doc: CHANGES Log Message: mention regex changes To generate a diff of this commit: cvs rdiff -u -r1.2787 -r1.2788 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2787 src/doc/CHANGES:1.2788 --- src/doc/CHANGES:1.2787 Thu Mar 25 14:52:23 2021 +++ src/doc/CHANGES Tue Mar 30 19:31:53 2021 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2787 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2788 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -335,6 +335,8 @@ Changes from NetBSD 9.0 to NetBSD 10.0: bind: Import version 9.16.12. [christos 20210219] OpenSSL: Imported 1.1.1j. [christos 20210219] byacc: Update to 20210109. [christos 20210220] + regex: Add NLS support and gnu regex extensions (off by default) + [christos 20210223] wpa: Import wpa_supplicant and hostapd 2.9. [christos 20210228] tzcode: Updated to 2021a. [christos 20210228] OpenSSH: Import 8.5. [christos 20210304]
CVS commit: src/sys/arch/sparc64/doc
Module Name:src Committed By: palle Date: Tue Mar 30 20:23:45 UTC 2021 Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: sun4v: update TODO after pcb spill improvements and status when running on a S7 host To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/sparc64/doc/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/doc/TODO diff -u src/sys/arch/sparc64/doc/TODO:1.39 src/sys/arch/sparc64/doc/TODO:1.40 --- src/sys/arch/sparc64/doc/TODO:1.39 Tue Mar 23 19:13:46 2021 +++ src/sys/arch/sparc64/doc/TODO Tue Mar 30 20:23:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: TODO,v 1.39 2021/03/23 19:13:46 palle Exp $ */ +/* $NetBSD: TODO,v 1.40 2021/03/30 20:23:45 palle Exp $ */ Things to be done: @@ -17,11 +17,12 @@ sun4v: - ldom virtual network interface (vnet) is working (verified by exiting sysinst and issuing a ping command) - the sysinst tool starts, disk setup is working, - but the process crashes when selecting network installation method - (the pcbspill function in locore.s incorrectly only spills one register - window even if more than one is are present) + but the process crashes when selecting network installation method (trap 0x34 ALIGN is received) T2000 ldom with 8 VCPU and 4GB: - On this platform it crashes in /sbin/init doing an access() call where %o0 is corrupted (zero) + - crashes in /sbin/init doing an access() call where %o0 is corrupted (zero) + S7 ldom with 8 VCPU and 16GB (primary ldom is Solaris 11.4 SRU30): + - during autoconfiguration of vnet devices the call to hv_vintr_setenabled() + returns error code 7 (EBADTRAP?) - idle handling - call hypervisor trap (openbsd code...??) - 64-bit kernel support - 32-bit kernel support
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Mar 30 20:23:30 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: clean up duplicate code in handling of initialization No functional change. To generate a diff of this commit: cvs rdiff -u -r1.183 -r1.184 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.183 src/usr.bin/xlint/lint1/init.c:1.184 --- src/usr.bin/xlint/lint1/init.c:1.183 Tue Mar 30 16:07:07 2021 +++ src/usr.bin/xlint/lint1/init.c Tue Mar 30 20:23:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.183 2021/03/30 16:07:07 rillig Exp $ */ +/* $NetBSD: init.c,v 1.184 2021/03/30 20:23:30 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.183 2021/03/30 16:07:07 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.184 2021/03/30 20:23:30 rillig Exp $"); #endif #include @@ -534,6 +534,9 @@ designation_reset(struct designation *dn next = dr->dr_next; designator_free(dr); } + + dn->dn_head = NULL; + dn->dn_tail = NULL; } @@ -587,21 +590,6 @@ brace_level_debug(const struct brace_lev #define brace_level_debug(level) do { } while (false) #endif -static void -brace_level_remove_designation(struct brace_level *bl) -{ - struct designator *dr, *next; - - for (dr = bl->bl_designation.dn_head; dr != NULL; dr = next) { - next = dr->dr_next; - designator_free(dr); - } - - bl->bl_designation.dn_head = NULL; - bl->bl_designation.dn_tail = NULL; -} - - static const type_t * brace_level_sub_type_struct_or_union(const struct brace_level *bl) { @@ -847,11 +835,12 @@ initialization_end_brace_level(struct in bl = in->in_brace_level; in->in_brace_level = bl->bl_enclosing; brace_level_free(bl); + bl = in->in_brace_level; - if (in->in_brace_level != NULL) { - brace_level_advance(in->in_brace_level); - brace_level_remove_designation(in->in_brace_level); - } + if (bl != NULL) + brace_level_advance(bl); + if (bl != NULL) + designation_reset(>bl_designation); initialization_debug(in); debug_leave(); @@ -869,14 +858,6 @@ initialization_add_designator(struct ini designation_add(>in_brace_level->bl_designation, name, subscript); } -static void -initialization_remove_designation(struct initialization *in) -{ - - if (in->in_brace_level != NULL) - brace_level_remove_designation(in->in_brace_level); -} - /* * An object with automatic storage duration that has a single initializer * expression without braces and is not an array is initialized by delegating @@ -951,13 +932,14 @@ initialization_init_array_using_string(s static void initialization_expr(struct initialization *in, tnode_t *tn) { + struct brace_level *bl; const type_t *tp; if (in->in_err) return; - if (in->in_brace_level != NULL && - in->in_brace_level->bl_omitted_braces) + bl = in->in_brace_level; + if (bl != NULL && bl->bl_omitted_braces) return; debug_enter(); @@ -969,13 +951,13 @@ initialization_expr(struct initializatio if (initialization_init_array_using_string(in, tn)) goto advance; - if (in->in_brace_level != NULL) - brace_level_apply_designation(in->in_brace_level); + if (bl != NULL) + brace_level_apply_designation(bl); tp = initialization_sub_type(in); if (tp == NULL) goto done; - if (in->in_brace_level == NULL && !is_scalar(tp->t_tspec)) { + if (bl == NULL && !is_scalar(tp->t_tspec)) { /* {}-enclosed initializer required */ error(181); goto done; @@ -989,8 +971,8 @@ initialization_expr(struct initializatio */ if (is_scalar(tn->tn_type->t_tspec) && tp->t_tspec == ARRAY && - in->in_brace_level != NULL) { - in->in_brace_level->bl_omitted_braces = true; + bl != NULL) { + bl->bl_omitted_braces = true; goto done; } @@ -999,10 +981,12 @@ initialization_expr(struct initializatio check_init_expr(tp, in->in_sym, tn); advance: - if (in->in_brace_level != NULL) - brace_level_advance(in->in_brace_level); + if (bl != NULL) + brace_level_advance(bl); done: - initialization_remove_designation(in); + if (bl != NULL) + designation_reset(>bl_designation); + initialization_debug(in); debug_leave(); }
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: palle Date: Tue Mar 30 20:03:15 UTC 2021 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: sun4v: handle spill trap properly when trap level is 1 and otherwin is non-zero - ensure that all windows are spilled to the pcb like the sun4u winfixsave code path To generate a diff of this commit: cvs rdiff -u -r1.425 -r1.426 src/sys/arch/sparc64/sparc64/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.425 src/sys/arch/sparc64/sparc64/locore.s:1.426 --- src/sys/arch/sparc64/sparc64/locore.s:1.425 Mon Feb 22 09:56:42 2021 +++ src/sys/arch/sparc64/sparc64/locore.s Tue Mar 30 20:03:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.425 2021/02/22 09:56:42 palle Exp $ */ +/* $NetBSD: locore.s,v 1.426 2021/03/30 20:03:14 palle Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -234,7 +234,7 @@ .endm .macro sun4v_tl1_uspill_other - ba,a,pt %xcc, pcbspill_others + ba,a,pt %xcc, pcbspill_other nop .align 128 .endm @@ -3485,6 +3485,77 @@ pcbspill_fail: Debugger() NOTREACHED + +pcbspill_other: + + set CPUINFO_VA, %g6 + ldx [%g6 + CI_CPCB], %g6 + + GET_CTXBUSY %g1 + + ldx [%g1], %g1! kernel pmap is ctx 0 + + srlx %g6, STSHIFT, %g7 + and %g7, STMASK, %g7 + sll %g7, 3, %g7! byte offset into ctxbusy + add %g7, %g1, %g1 + ldxa [%g1] ASI_PHYS_CACHED, %g1 ! Load pointer to directory + + srlx %g6, PDSHIFT, %g7 ! Do page directory + and %g7, PDMASK, %g7 + sll %g7, 3, %g7 + brz,pn %g1, pcbspill_other_fail + add %g7, %g1, %g1 + ldxa [%g1] ASI_PHYS_CACHED, %g1 + srlx %g6, PTSHIFT, %g7 ! Convert to ptab offset + and %g7, PTMASK, %g7 + brz %g1, pcbspill_other_fail + sll %g7, 3, %g7 + add %g1, %g7, %g7 + ldxa [%g7] ASI_PHYS_CACHED, %g7 ! This one is not + brgez %g7, pcbspill_other_fail + srlx %g7, PGSHIFT, %g7 ! Isolate PA part + sll %g6, 32-PGSHIFT, %g6 ! And offset + sllx %g7, PGSHIFT+8, %g7 ! There are 8 bits to the left of the PA in the TTE + srl %g6, 32-PGSHIFT, %g6 + srax %g7, 8, %g7 + or %g7, %g6, %g6! Then combine them to form PA + + wr %g0, ASI_PHYS_CACHED, %asi ! Use ASI_PHYS_CACHED to prevent possible page faults + + lduba [%g6 + PCB_NSAVED] %asi, %g7 ! Fetch current nsaved from the pcb + sllx %g7, 7, %g5! 8+8 registers each 8 bytes = 128 bytes (2^7) + add %g6, %g5, %g5! Offset into pcb_rw +1: + SPILL stxa, %g5 + PCB_RW, 8, %asi ! Store the locals and ins + + add %g5, 16*8, %g5! Next location for saved register windows + + stxa %o6, [%g5 + PCB_RW + (14*8)] %asi ! Save %sp so we can write these all out + + saved ! Increments %cansave and decrements %otherwin + + rdpr %cwp, %g1! shift register window forward + inc %g1 + wrpr %g1, %cwp + + + inc %g7 ! increment number of saved register windows + + rdpr %otherwin, %g1! Check to see if done spill'ing otherwin + brnz,pt %g1, 1b + nop + + stba %g7, [%g6 + PCB_NSAVED] %asi + + retry + NOTREACHED + +pcbspill_other_fail: + Debugger() + NOTREACHED + + spill_normal_to_user_stack: mov %sp, %g6 ! calculate virtual address of destination stack add %g6, BIAS, %g6
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Mar 30 19:45:04 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp Log Message: tests/lint: test 'scalar type cannot use designator' To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.22 -r1.23 src/tests/usr.bin/xlint/lint1/d_c99_init.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.28 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.29 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.28 Tue Mar 30 16:09:30 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Tue Mar 30 19:45:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.28 2021/03/30 16:09:30 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.29 2021/03/30 19:45:04 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -376,3 +376,12 @@ union { } union_with_only_unnamed_members = { /* expect: has no named members */ 123, /* expect: too many struct/union initializers */ }; + +int designator_for_scalar = { + .value = 3, /* expect: scalar type cannot use designator */ +}; + +struct point designator_for_scalar_in_struct = { + { .x = 3 }, /* expect: scalar type cannot use designator */ + { [1] = 4 }, /* expect: scalar type cannot use designator */ +}; Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.22 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.23 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.22 Tue Mar 30 16:09:30 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 19:45:04 2021 @@ -22,3 +22,6 @@ d_c99_init.c(370): warning: structure ha d_c99_init.c(371): error: too many struct/union initializers [172] d_c99_init.c(376): warning: union has no named members [65] d_c99_init.c(377): error: too many struct/union initializers [172] +d_c99_init.c(381): error: syntax error 'scalar type cannot use designator' [249] +d_c99_init.c(385): error: syntax error 'scalar type cannot use designator' [249] +d_c99_init.c(386): error: syntax error 'scalar type cannot use designator' [249]
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Mar 30 16:09:30 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp Log Message: tests/lint: remove unnecessary empty lines from test In a separate commit to not cause an unnecessarily large diff in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.21 -r1.22 src/tests/usr.bin/xlint/lint1/d_c99_init.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.27 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.28 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.27 Tue Mar 30 16:07:07 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Tue Mar 30 16:09:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.27 2021/03/30 16:07:07 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.28 2021/03/30 16:09:30 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -135,7 +135,6 @@ struct point point_with_designators = { struct point point_with_mixed_designators = { .x = 3, 4, - 5, /* expect: too many struct/union initializers */ .x = 3, }; @@ -211,7 +210,6 @@ struct geometry { * structs. */ struct geometry geometry = { - .pentagons[0].points[4].x = 1, .points[0][0][0] = { 0, 0 }, .points[2][4][1] = {301, 302 }, Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.21 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.22 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.21 Tue Mar 30 16:07:07 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 16:09:30 2021 @@ -1,24 +1,24 @@ d_c99_init.c(23): error: too many initializers [174] d_c99_init.c(63): error: cannot initialize 'pointer to const void' from 'struct any' [185] d_c99_init.c(80): error: too many array initializers, expected 3 [173] -d_c99_init.c(139): error: too many struct/union initializers [172] -d_c99_init.c(145): error: syntax error 'designator '.member' is only for struct/union' [249] -d_c99_init.c(219): error: array subscript cannot be > 2: 3 [168] -d_c99_init.c(221): error: array subscript cannot be > 4: 5 [168] -d_c99_init.c(223): error: array subscript cannot be > 1: 2 [168] -d_c99_init.c(232): error: too many struct/union initializers [172] -d_c99_init.c(238): warning: illegal combination of integer (char) and pointer (pointer to char) [183] -d_c99_init.c(242): warning: illegal combination of integer (char) and pointer (pointer to char) [183] -d_c99_init.c(281): error: cannot initialize 'struct ' from 'int' [185] -d_c99_init.c(323): error: duplicate case in switch: 0 [199] -d_c99_init.c(332): error: type 'struct point' does not have member 'r' [101] -d_c99_init.c(339): error: type 'struct point' does not have member 'r' [101] -d_c99_init.c(346): error: type 'struct point' does not have member 'r' [101] -d_c99_init.c(355): error: type 'union value' does not have member 'unknown_value' [101] -d_c99_init.c(361): error: type 'union value' does not have member 'unknown_value' [101] -d_c99_init.c(365): error: syntax error 'designator '[...]' is only for arrays' [249] -d_c99_init.c(366): error: type 'struct point' does not have member 'member' [101] -d_c99_init.c(372): warning: structure has no named members [65] -d_c99_init.c(373): error: too many struct/union initializers [172] -d_c99_init.c(378): warning: union has no named members [65] -d_c99_init.c(379): error: too many struct/union initializers [172] +d_c99_init.c(138): error: too many struct/union initializers [172] +d_c99_init.c(144): error: syntax error 'designator '.member' is only for struct/union' [249] +d_c99_init.c(217): error: array subscript cannot be > 2: 3 [168] +d_c99_init.c(219): error: array subscript cannot be > 4: 5 [168] +d_c99_init.c(221): error: array subscript cannot be > 1: 2 [168] +d_c99_init.c(230): error: too many struct/union initializers [172] +d_c99_init.c(236): warning: illegal combination of integer (char) and pointer (pointer to char) [183] +d_c99_init.c(240): warning: illegal combination of integer (char) and pointer (pointer to char) [183] +d_c99_init.c(279): error: cannot initialize 'struct ' from 'int' [185] +d_c99_init.c(321): error: duplicate case in switch: 0 [199] +d_c99_init.c(330): error: type 'struct point' does not have member 'r' [101] +d_c99_init.c(337): error: type 'struct point' does not have member 'r' [101] +d_c99_init.c(344): error: type 'struct point' does not have member 'r' [101] +d_c99_init.c(353): error: type 'union value' does not have member 'unknown_value' [101] +d_c99_init.c(359): error: type 'union value' does not have member 'unknown_value' [101] +d_c99_init.c(363): error: syntax error 'designator '[...]' is only for arrays' [249] +d_c99_init.c(364): error: type 'struct point' does not have member
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Mar 30 16:07:07 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp src/usr.bin/xlint/lint1: init.c Log Message: lint: add error about out-of-bounds array subscripts This check is not strictly necessary since any C99 compiler must diagnose them as well, it is rather meant for demonstrating how to do the check in lint, and for symmetry with the 'unknown member' error message. These provide insight into how the data structures in init.c are meant to be accessed. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.20 -r1.21 src/tests/usr.bin/xlint/lint1/d_c99_init.exp cvs rdiff -u -r1.182 -r1.183 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.26 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.27 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.26 Tue Mar 30 15:18:19 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Tue Mar 30 16:07:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.26 2021/03/30 15:18:19 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.27 2021/03/30 16:07:07 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -135,7 +135,7 @@ struct point point_with_designators = { struct point point_with_mixed_designators = { .x = 3, 4, - /* TODO: remove me */ + 5, /* expect: too many struct/union initializers */ .x = 3, }; @@ -211,15 +211,15 @@ struct geometry { * structs. */ struct geometry geometry = { - /* TODO: remove me */ + .pentagons[0].points[4].x = 1, .points[0][0][0] = { 0, 0 }, .points[2][4][1] = {301, 302 }, - /* TODO: expect+1: array index 3 must be between 0 and 2 */ + /* expect+1: array subscript cannot be > 2: 3 */ .points[3][0][0] = {3001, 3002 }, - /* TODO: expect+1: array index 5 must be between 0 and 4 */ + /* expect+1: array subscript cannot be > 4: 5 */ .points[0][5][0] = {501, 502 }, - /* TODO: expect+1: array index 2 must be between 0 and 1 */ + /* expect+1: array subscript cannot be > 1: 2 */ .points[0][0][2] = {21, 22 }, }; Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.20 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.21 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.20 Tue Mar 30 15:18:19 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 16:07:07 2021 @@ -3,6 +3,9 @@ d_c99_init.c(63): error: cannot initiali d_c99_init.c(80): error: too many array initializers, expected 3 [173] d_c99_init.c(139): error: too many struct/union initializers [172] d_c99_init.c(145): error: syntax error 'designator '.member' is only for struct/union' [249] +d_c99_init.c(219): error: array subscript cannot be > 2: 3 [168] +d_c99_init.c(221): error: array subscript cannot be > 4: 5 [168] +d_c99_init.c(223): error: array subscript cannot be > 1: 2 [168] d_c99_init.c(232): error: too many struct/union initializers [172] d_c99_init.c(238): warning: illegal combination of integer (char) and pointer (pointer to char) [183] d_c99_init.c(242): warning: illegal combination of integer (char) and pointer (pointer to char) [183] Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.182 src/usr.bin/xlint/lint1/init.c:1.183 --- src/usr.bin/xlint/lint1/init.c:1.182 Tue Mar 30 15:18:19 2021 +++ src/usr.bin/xlint/lint1/init.c Tue Mar 30 16:07:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.182 2021/03/30 15:18:19 rillig Exp $ */ +/* $NetBSD: init.c,v 1.183 2021/03/30 16:07:07 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.182 2021/03/30 15:18:19 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.183 2021/03/30 16:07:07 rillig Exp $"); #endif #include @@ -455,6 +455,11 @@ designator_look_up(const struct designat error(249, "designator '.member' is only for struct/union"); } + if (!tp->t_incomplete_array && + dr->dr_subscript >= (size_t)tp->t_dim) { + /* array subscript cannot be > %d: %ld */ + error(168, tp->t_dim - 1, (long)dr->dr_subscript); + } return tp->t_subt; default: /* syntax error '%s' */
CVS commit: src/lib/libc/gen
Module Name:src Committed By: rillig Date: Tue Mar 30 15:31:51 UTC 2021 Modified Files: src/lib/libc/gen: sysctl.c Log Message: libc/gen: fix hack for previously unsupported lint initializers Supported since init.c 1.182 from 2021-03-30. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libc/gen/sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/sysctl.c diff -u src/lib/libc/gen/sysctl.c:1.37 src/lib/libc/gen/sysctl.c:1.38 --- src/lib/libc/gen/sysctl.c:1.37 Wed May 16 20:21:39 2018 +++ src/lib/libc/gen/sysctl.c Tue Mar 30 15:31:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.37 2018/05/16 20:21:39 joerg Exp $ */ +/* $NetBSD: sysctl.c,v 1.38 2021/03/30 15:31:51 rillig Exp $ */ /*- * Copyright (c) 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94"; #else -__RCSID("$NetBSD: sysctl.c,v 1.37 2018/05/16 20:21:39 joerg Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.38 2021/03/30 15:31:51 rillig Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -120,12 +120,6 @@ user_sysctl(const int *name, unsigned in * the nodes under the "user" node */ static const struct sysctlnode sysctl_usermib[] = { -#if defined(lint) - /* - * lint doesn't like my initializers - */ - 0 -#else /* !lint */ { .sysctl_flags = SYSCTL_VERSION|CTLFLAG_PERMANENT| CTLTYPE_STRING, @@ -239,7 +233,6 @@ user_sysctl(const int *name, unsigned in _INT("atexit_max", USER_ATEXIT_MAX, -1, "The maximum number of functions that may be registered " "with atexit(3)"), -#endif /* !lint */ }; #undef _INT
CVS commit: src/share/man/man4
Module Name:src Committed By: rin Date: Tue Mar 30 15:29:43 UTC 2021 Modified Files: src/share/man/man4: siisata.4 Log Message: Make this format a little bit nicely. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/siisata.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/siisata.4 diff -u src/share/man/man4/siisata.4:1.7 src/share/man/man4/siisata.4:1.8 --- src/share/man/man4/siisata.4:1.7 Sat Oct 7 17:35:48 2017 +++ src/share/man/man4/siisata.4 Tue Mar 30 15:29:43 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: siisata.4,v 1.7 2017/10/07 17:35:48 jdolecek Exp $ +.\" $NetBSD: siisata.4,v 1.8 2021/03/30 15:29:43 rin Exp $ .\" .\" Copyright (c) 2007, 2008 Jonathan A. Kollasch. All rights reserved. .\" @@ -64,7 +64,7 @@ driver first appeared in .Nx 5.0 . NCQ support was added in .Nx -on October 7, 2017 . +on October 7, 2017. .Sh AUTHORS The .Nm @@ -73,11 +73,10 @@ driver was written by NCQ support was added by him, and .An Jaromir Dolecek Aq Mt jdole...@netbsd.org . .Sh BUGS -.Bl -tag -width Ds -compact -.It Device hot swapping is not yet supported . -.It Silicon Image's Software RAID is not yet supported by the +Device hot swapping is not yet supported. +.Pp +Silicon Image's Software RAID is not yet supported by the .Xr ataraid 4 driver. .Xr raid 4 can be used instead. -.El
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Mar 30 15:18:19 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp msg_101.c msg_101.exp src/usr.bin/xlint/lint1: err.c init.c tree.c Log Message: lint: add type information for message about unknown member name To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.19 -r1.20 src/tests/usr.bin/xlint/lint1/d_c99_init.exp cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_101.c \ src/tests/usr.bin/xlint/lint1/msg_101.exp cvs rdiff -u -r1.98 -r1.99 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.181 -r1.182 src/usr.bin/xlint/lint1/init.c cvs rdiff -u -r1.253 -r1.254 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.25 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.26 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.25 Tue Mar 30 15:05:05 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Tue Mar 30 15:18:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.25 2021/03/30 15:05:05 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.26 2021/03/30 15:18:19 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -329,21 +329,21 @@ ensure_array_type_is_not_modified_during } struct point unknown_member_name_beginning = { - .r = 5, /* expect: undefined struct/union member: r */ + .r = 5, /* expect: does not have member 'r' */ .x = 4, .y = 3, }; struct point unknown_member_name_middle = { .x = 4, - .r = 5, /* expect: undefined struct/union member: r */ + .r = 5, /* expect: does not have member 'r' */ .y = 3, }; struct point unknown_member_name_end = { .x = 4, .y = 3, - .r = 5, /* expect: undefined struct/union member: r */ + .r = 5, /* expect: does not have member 'r' */ }; union value { @@ -352,18 +352,18 @@ union value { }; union value unknown_union_member_name_first = { - .unknown_value = 4, /* expect: undefined struct/union member */ + .unknown_value = 4, /* expect: does not have member */ .int_value = 3, }; union value unknown_union_member_name_second = { .int_value = 3, - .unknown_value = 4, /* expect: undefined struct/union member */ + .unknown_value = 4, /* expect: does not have member */ }; struct point designators_with_subscript = { [0] = 3, /* expect: only for arrays */ - .member[0][0].member = 4, /* expect: undefined struct/union member */ + .member[0][0].member = 4, /* expect: does not have member 'member' */ .x.y.z = 5, /* intentionally not caught, see designator_look_up */ }; Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.19 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.20 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.19 Tue Mar 30 15:10:46 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 15:18:19 2021 @@ -8,13 +8,13 @@ d_c99_init.c(238): warning: illegal comb d_c99_init.c(242): warning: illegal combination of integer (char) and pointer (pointer to char) [183] d_c99_init.c(281): error: cannot initialize 'struct ' from 'int' [185] d_c99_init.c(323): error: duplicate case in switch: 0 [199] -d_c99_init.c(332): error: undefined struct/union member: r [101] -d_c99_init.c(339): error: undefined struct/union member: r [101] -d_c99_init.c(346): error: undefined struct/union member: r [101] -d_c99_init.c(355): error: undefined struct/union member: unknown_value [101] -d_c99_init.c(361): error: undefined struct/union member: unknown_value [101] +d_c99_init.c(332): error: type 'struct point' does not have member 'r' [101] +d_c99_init.c(339): error: type 'struct point' does not have member 'r' [101] +d_c99_init.c(346): error: type 'struct point' does not have member 'r' [101] +d_c99_init.c(355): error: type 'union value' does not have member 'unknown_value' [101] +d_c99_init.c(361): error: type 'union value' does not have member 'unknown_value' [101] d_c99_init.c(365): error: syntax error 'designator '[...]' is only for arrays' [249] -d_c99_init.c(366): error: undefined struct/union member: member [101] +d_c99_init.c(366): error: type 'struct point' does not have member 'member' [101] d_c99_init.c(372): warning: structure has no named members [65] d_c99_init.c(373): error: too many struct/union initializers [172] d_c99_init.c(378): warning: union has no named members [65] Index: src/tests/usr.bin/xlint/lint1/msg_101.c diff -u src/tests/usr.bin/xlint/lint1/msg_101.c:1.3 src/tests/usr.bin/xlint/lint1/msg_101.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_101.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_101.c Tue Mar 30 15:18:19 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_101.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_101.c,v 1.4
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Mar 30 15:10:46 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.exp src/usr.bin/xlint/lint1: init.c Log Message: lint: reword message for very unlikely .member in array initialization To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/tests/usr.bin/xlint/lint1/d_c99_init.exp cvs rdiff -u -r1.180 -r1.181 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.18 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.19 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.18 Tue Mar 30 15:05:05 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 15:10:46 2021 @@ -2,7 +2,7 @@ d_c99_init.c(23): error: too many initia d_c99_init.c(63): error: cannot initialize 'pointer to const void' from 'struct any' [185] d_c99_init.c(80): error: too many array initializers, expected 3 [173] d_c99_init.c(139): error: too many struct/union initializers [172] -d_c99_init.c(145): error: syntax error 'named member must only be used with struct/union' [249] +d_c99_init.c(145): error: syntax error 'designator '.member' is only for struct/union' [249] d_c99_init.c(232): error: too many struct/union initializers [172] d_c99_init.c(238): warning: illegal combination of integer (char) and pointer (pointer to char) [183] d_c99_init.c(242): warning: illegal combination of integer (char) and pointer (pointer to char) [183] Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.180 src/usr.bin/xlint/lint1/init.c:1.181 --- src/usr.bin/xlint/lint1/init.c:1.180 Tue Mar 30 15:07:53 2021 +++ src/usr.bin/xlint/lint1/init.c Tue Mar 30 15:10:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.180 2021/03/30 15:07:53 rillig Exp $ */ +/* $NetBSD: init.c,v 1.181 2021/03/30 15:10:46 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.180 2021/03/30 15:07:53 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.181 2021/03/30 15:10:46 rillig Exp $"); #endif #include @@ -452,10 +452,9 @@ designator_look_up(const struct designat return look_up_member_type(tp, dr->dr_name); case ARRAY: if (dr->dr_name != NULL) { - /* TODO: reword; kept for compatibility */ /* syntax error '%s' */ error(249, - "named member must only be used with struct/union"); + "designator '.member' is only for struct/union"); } return tp->t_subt; default:
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Mar 30 15:07:53 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_175.c msg_175.exp src/usr.bin/xlint/lint1: err.c init.c Log Message: lint: add type information to message 175 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_175.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_175.exp cvs rdiff -u -r1.97 -r1.98 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.179 -r1.180 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_175.c diff -u src/tests/usr.bin/xlint/lint1/msg_175.c:1.3 src/tests/usr.bin/xlint/lint1/msg_175.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_175.c:1.3 Mon Feb 22 15:09:50 2021 +++ src/tests/usr.bin/xlint/lint1/msg_175.c Tue Mar 30 15:07:53 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_175.c,v 1.3 2021/02/22 15:09:50 rillig Exp $ */ +/* $NetBSD: msg_175.c,v 1.4 2021/03/30 15:07:53 rillig Exp $ */ # 3 "msg_175.c" -// Test for message: initialization of an incomplete type [175] +// Test for message: initialization of incomplete type '%s' [175] struct incomplete; /* expect: 233 */ Index: src/tests/usr.bin/xlint/lint1/msg_175.exp diff -u src/tests/usr.bin/xlint/lint1/msg_175.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_175.exp:1.5 --- src/tests/usr.bin/xlint/lint1/msg_175.exp:1.4 Sun Mar 21 20:45:00 2021 +++ src/tests/usr.bin/xlint/lint1/msg_175.exp Tue Mar 30 15:07:53 2021 @@ -1,3 +1,3 @@ -msg_175.c(8): error: initialization of an incomplete type [175] +msg_175.c(8): error: initialization of incomplete type 'struct incomplete' [175] msg_175.c(10): error: incomplete structure or union incomplete: incomplete [31] msg_175.c(6): warning: struct incomplete never defined [233] Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.97 src/usr.bin/xlint/lint1/err.c:1.98 --- src/usr.bin/xlint/lint1/err.c:1.97 Sun Mar 28 14:01:49 2021 +++ src/usr.bin/xlint/lint1/err.c Tue Mar 30 15:07:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.97 2021/03/28 14:01:49 rillig Exp $ */ +/* $NetBSD: err.c,v 1.98 2021/03/30 15:07:53 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.97 2021/03/28 14:01:49 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.98 2021/03/30 15:07:53 rillig Exp $"); #endif #include @@ -229,7 +229,7 @@ const char *msgs[] = { "too many struct/union initializers", /* 172 */ "too many array initializers, expected %d", /* 173 */ "too many initializers", /* 174 */ - "initialization of an incomplete type", /* 175 */ + "initialization of incomplete type '%s'", /* 175 */ "", /* no longer used */ /* 176 */ "non-constant initializer", /* 177 */ "initializer does not fit", /* 178 */ Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.179 src/usr.bin/xlint/lint1/init.c:1.180 --- src/usr.bin/xlint/lint1/init.c:1.179 Tue Mar 30 14:25:28 2021 +++ src/usr.bin/xlint/lint1/init.c Tue Mar 30 15:07:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.179 2021/03/30 14:25:28 rillig Exp $ */ +/* $NetBSD: init.c,v 1.180 2021/03/30 15:07:53 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.179 2021/03/30 14:25:28 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.180 2021/03/30 15:07:53 rillig Exp $"); #endif #include @@ -802,9 +802,8 @@ initialization_begin_brace_level(struct } if (tp->t_tspec == STRUCT && tp->t_str->sou_incomplete) { - /* TODO: add type information */ - /* initialization of an incomplete type */ - error(175); + /* initialization of incomplete type '%s' */ + error(175, type_name(tp)); in->in_err = true; goto done; }
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Mar 30 15:05:05 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp msg_247.c Log Message: tests/lint: remove outdated comments To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/xlint/lint1/d_c99_init.exp cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_247.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.24 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.25 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.24 Tue Mar 30 14:25:28 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Tue Mar 30 15:05:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.24 2021/03/30 14:25:28 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.25 2021/03/30 15:05:05 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -260,9 +260,8 @@ struct ten { struct ten ten = { .i3 = 3, 4, - // FIXME: assertion "level->bl_type->t_tspec == ARRAY" failed in brace_level_extend_if_array_of_unknown_size - // 5, - // 6, + 5, + 6, }; int c99_6_7_8_p26_example3[4][3] = { @@ -330,7 +329,6 @@ ensure_array_type_is_not_modified_during } struct point unknown_member_name_beginning = { - /* TODO: remove me */ .r = 5, /* expect: undefined struct/union member: r */ .x = 4, .y = 3, @@ -354,14 +352,12 @@ union value { }; union value unknown_union_member_name_first = { - /* TODO: remove me */ .unknown_value = 4, /* expect: undefined struct/union member */ .int_value = 3, }; union value unknown_union_member_name_second = { .int_value = 3, - /* TODO: remove me */ .unknown_value = 4, /* expect: undefined struct/union member */ }; Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.17 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.18 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.17 Tue Mar 30 14:25:28 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 15:05:05 2021 @@ -6,16 +6,16 @@ d_c99_init.c(145): error: syntax error ' d_c99_init.c(232): error: too many struct/union initializers [172] d_c99_init.c(238): warning: illegal combination of integer (char) and pointer (pointer to char) [183] d_c99_init.c(242): warning: illegal combination of integer (char) and pointer (pointer to char) [183] -d_c99_init.c(282): error: cannot initialize 'struct ' from 'int' [185] -d_c99_init.c(324): error: duplicate case in switch: 0 [199] -d_c99_init.c(334): error: undefined struct/union member: r [101] -d_c99_init.c(341): error: undefined struct/union member: r [101] -d_c99_init.c(348): error: undefined struct/union member: r [101] -d_c99_init.c(358): error: undefined struct/union member: unknown_value [101] -d_c99_init.c(365): error: undefined struct/union member: unknown_value [101] -d_c99_init.c(369): error: syntax error 'designator '[...]' is only for arrays' [249] -d_c99_init.c(370): error: undefined struct/union member: member [101] -d_c99_init.c(376): warning: structure has no named members [65] -d_c99_init.c(377): error: too many struct/union initializers [172] -d_c99_init.c(382): warning: union has no named members [65] -d_c99_init.c(383): error: too many struct/union initializers [172] +d_c99_init.c(281): error: cannot initialize 'struct ' from 'int' [185] +d_c99_init.c(323): error: duplicate case in switch: 0 [199] +d_c99_init.c(332): error: undefined struct/union member: r [101] +d_c99_init.c(339): error: undefined struct/union member: r [101] +d_c99_init.c(346): error: undefined struct/union member: r [101] +d_c99_init.c(355): error: undefined struct/union member: unknown_value [101] +d_c99_init.c(361): error: undefined struct/union member: unknown_value [101] +d_c99_init.c(365): error: syntax error 'designator '[...]' is only for arrays' [249] +d_c99_init.c(366): error: undefined struct/union member: member [101] +d_c99_init.c(372): warning: structure has no named members [65] +d_c99_init.c(373): error: too many struct/union initializers [172] +d_c99_init.c(378): warning: union has no named members [65] +d_c99_init.c(379): error: too many struct/union initializers [172] Index: src/tests/usr.bin/xlint/lint1/msg_247.c diff -u src/tests/usr.bin/xlint/lint1/msg_247.c:1.7 src/tests/usr.bin/xlint/lint1/msg_247.c:1.8 --- src/tests/usr.bin/xlint/lint1/msg_247.c:1.7 Fri Mar 26 16:59:19 2021 +++ src/tests/usr.bin/xlint/lint1/msg_247.c Tue Mar 30 15:05:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_247.c,v 1.7 2021/03/26 16:59:19 rillig Exp $ */ +/* $NetBSD: msg_247.c,v 1.8 2021/03/30 15:05:05 rillig Exp $ */ # 3 "msg_247.c" // Test for message: pointer cast from '%s' to '%s' may be troublesome [247] @@ -40,7 +40,7 @@ example(struct Other *arg) * Casting to 'pointer to char' may
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Tue Mar 30 14:58:17 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: remove workaround for bug in lint The bug has been fixed in lint. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.893 -r1.894 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.893 src/usr.bin/make/var.c:1.894 --- src/usr.bin/make/var.c:1.893 Sun Mar 21 23:03:33 2021 +++ src/usr.bin/make/var.c Tue Mar 30 14:58:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.893 2021/03/21 23:03:33 rillig Exp $ */ +/* $NetBSD: var.c,v 1.894 2021/03/30 14:58:17 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.893 2021/03/21 23:03:33 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.894 2021/03/30 14:58:17 rillig Exp $"); typedef enum VarFlags { VFL_NONE = 0, @@ -4342,12 +4342,7 @@ Var_Parse(const char **pp, GNode *scope, Expr expr = { NULL, -#if defined(lint) - /* NetBSD lint cannot fully parse C99 struct initializers. */ - { NULL, NULL }, -#else FStr_InitRefer(NULL), -#endif eflags, scope, DEF_REGULAR
CVS commit: src/sys/arch/powerpc/ibm4xx
Module Name:src Committed By: rin Date: Tue Mar 30 14:33:10 UTC 2021 Modified Files: src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c Log Message: Use ``for (;;)'' for infinite loop, as required by style. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c diff -u src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.36 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.37 --- src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.36 Tue Mar 30 01:33:50 2021 +++ src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c Tue Mar 30 14:33:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ibm4xx_machdep.c,v 1.36 2021/03/30 01:33:50 rin Exp $ */ +/* $NetBSD: ibm4xx_machdep.c,v 1.37 2021/03/30 14:33:10 rin Exp $ */ /* Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */ /* @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.36 2021/03/30 01:33:50 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.37 2021/03/30 14:33:10 rin Exp $"); #include "ksyms.h" @@ -221,7 +221,7 @@ cpu_reboot(int howto, char *what) printf("ppc4xx_reset() failed!\n"); - while (1 /* CONSTCOND */) { + for (;;) { #if defined(DDB) Debugger(); #elif defined(KGDB)
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: rin Date: Tue Mar 30 14:29:54 UTC 2021 Modified Files: src/sys/arch/powerpc/booke: booke_machdep.c Log Message: - Write-back msgbuf and update bootstr for reboot from halt. - Remove dead code. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/booke/booke_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/booke_machdep.c diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.32 src/sys/arch/powerpc/booke/booke_machdep.c:1.33 --- src/sys/arch/powerpc/booke/booke_machdep.c:1.32 Mon Jul 6 10:08:16 2020 +++ src/sys/arch/powerpc/booke/booke_machdep.c Tue Mar 30 14:29:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: booke_machdep.c,v 1.32 2020/07/06 10:08:16 rin Exp $ */ +/* $NetBSD: booke_machdep.c,v 1.33 2021/03/30 14:29:54 rin Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #define _POWERPC_BUS_DMA_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.32 2020/07/06 10:08:16 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.33 2021/03/30 14:29:54 rin Exp $"); #include "ksyms.h" @@ -288,15 +288,6 @@ cpu_reboot(int howto, char *what) cnpollc(1); /* For proper keyboard command handling */ cngetc(); cnpollc(0); - - printf("rebooting...\n\n"); - goto reboot; /* XXX for now... */ - -#ifdef DDB - printf("dropping to debugger\n"); - while(1) - Debugger(); -#endif } printf("rebooting\n\n"); @@ -321,7 +312,6 @@ cpu_reboot(int howto, char *what) /* flush cache for msgbuf */ dcache_wb(msgbuf_paddr, round_page(MSGBUFSIZE)); - reboot: __asm volatile("msync; isync"); (*cpu_md_ops.md_cpu_reset)();
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Mar 30 14:25:28 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool.c d_c99_init.c d_c99_init.exp d_init_array_using_string.c d_init_array_using_string.exp d_init_pop_member.c d_init_pop_member.exp src/usr.bin/xlint/lint1: cgram.y decl.c externs1.h init.c Log Message: lint: rewrite handling of initializations, fixing several bugs The previous implementation had a wrong model of how initialization happens in C99, its assertions failed in all kind of edge cases and it was not possible to fix the remaining bugs one at a time without running into even more obscure assertion failures. The debug logging was detailed but did not help to clarify the situation. After about 20 failed attempts at fixing the small details I decided to start all over and rewrite the initialization code from scratch. I left the low-level parts of handling designators, the code that is independent of brace_level and the high-level parts of how the parser calls into this module. Everything else is completely new. The concept of a brace level stays since that is how C99 describes initialization. The previous code could not handle multi-level designations (see d_init_pop_member.c). There are no more assertion failures in the initialization code. Some TODO comments have been left in the tests to keep the line numbers the same in this commit. These will be cleaned up in a follow-up commit. The new implementation does not handle initialization with "missing" braces. This is an edge case that both GCC and Clang warn about, so it is not widely used. If necessary, it may be added later. The new implementation does not use any global variables in the vast majority of the functions, to make all dependencies and possible modifications obvious. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_c99_bool.c \ src/tests/usr.bin/xlint/lint1/d_init_pop_member.c cvs rdiff -u -r1.23 -r1.24 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.16 -r1.17 src/tests/usr.bin/xlint/lint1/d_c99_init.exp cvs rdiff -u -r1.2 -r1.3 \ src/tests/usr.bin/xlint/lint1/d_init_array_using_string.c \ src/tests/usr.bin/xlint/lint1/d_init_array_using_string.exp cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp cvs rdiff -u -r1.206 -r1.207 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.166 -r1.167 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.94 -r1.95 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.178 -r1.179 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_bool.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool.c:1.6 src/tests/usr.bin/xlint/lint1/d_c99_bool.c:1.7 --- src/tests/usr.bin/xlint/lint1/d_c99_bool.c:1.6 Sun Feb 21 09:07:58 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool.c Tue Mar 30 14:25:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool.c,v 1.6 2021/02/21 09:07:58 rillig Exp $ */ +/* $NetBSD: d_c99_bool.c,v 1.7 2021/03/30 14:25:28 rillig Exp $ */ # 3 "d_c99_bool.c" /* @@ -9,7 +9,7 @@ * invoke undefined behavior. */ -/* Below, each wrong assertion produces "negative array dimension" [20]. */ +/* Below, each false statement produces "negative array dimension" [20]. */ int int_0_converts_to_false[(_Bool)0 ? -1 : 1]; int int_0_converts_to_true_[(_Bool)0 ? 1 : -1]; /* expect: 20 */ Index: src/tests/usr.bin/xlint/lint1/d_init_pop_member.c diff -u src/tests/usr.bin/xlint/lint1/d_init_pop_member.c:1.6 src/tests/usr.bin/xlint/lint1/d_init_pop_member.c:1.7 --- src/tests/usr.bin/xlint/lint1/d_init_pop_member.c:1.6 Fri Mar 19 17:40:37 2021 +++ src/tests/usr.bin/xlint/lint1/d_init_pop_member.c Tue Mar 30 14:25:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_init_pop_member.c,v 1.6 2021/03/19 17:40:37 rillig Exp $ */ +/* $NetBSD: d_init_pop_member.c,v 1.7 2021/03/30 14:25:28 rillig Exp $ */ # 3 "d_init_pop_member.c" /* @@ -35,7 +35,7 @@ struct state { void func(void) { - struct state st = { + struct state st = { /* expect: set but not used */ .capital.mayor.hobbies.dancing = 1, /* * Since 2015-07-28: @@ -45,7 +45,7 @@ void func(void) * Before init.c 1.52 from 2020-01-01: * wrong "warning: bit-field initializer does not fit [180]" */ - .capital.mayor.favorite_color.green = 0xFF, /*FIXME*//* expect: 101 */ + .capital.mayor.favorite_color.green = 0xFF, /* * Since 2015-07-28: * wrong "undefined struct/union member: capital [101]" @@ -54,6 +54,6 @@ void func(void) * Before init.c 1.52 from 2020-01-01: * wrong "warning: bit-field initializer does not fit [180]" */ - .capital.mayor.favorite_color.red = 0xFF, /*FIXME*//* expect: 101 */ + .capital.mayor.favorite_color.red = 0xFF, }; } Index:
CVS commit: src/sys/arch/powerpc/ibm4xx
Module Name:src Committed By: simonb Date: Tue Mar 30 13:41:46 UTC 2021 Modified Files: src/sys/arch/powerpc/ibm4xx: cpu.c Log Message: Fix nearly 20 year old type - cache sizes are 2048 bytes, not 2848 bytes. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/ibm4xx/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/ibm4xx/cpu.c diff -u src/sys/arch/powerpc/ibm4xx/cpu.c:1.37 src/sys/arch/powerpc/ibm4xx/cpu.c:1.38 --- src/sys/arch/powerpc/ibm4xx/cpu.c:1.37 Tue Mar 30 02:27:00 2021 +++ src/sys/arch/powerpc/ibm4xx/cpu.c Tue Mar 30 13:41:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.37 2021/03/30 02:27:00 rin Exp $ */ +/* $NetBSD: cpu.c,v 1.38 2021/03/30 13:41:46 simonb Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.37 2021/03/30 02:27:00 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.38 2021/03/30 13:41:46 simonb Exp $"); #include #include @@ -66,7 +66,7 @@ static const struct cputab models[] = { .ci = { .dcache_size = 1024, .dcache_line_size = 16, - .icache_size = 2848, + .icache_size = 2048, .icache_line_size = 16, } }, { @@ -94,7 +94,7 @@ static const struct cputab models[] = { .mask = 0x, .name = "401D2", .ci = { - .dcache_size = 2848, + .dcache_size = 2048, .dcache_line_size = 16, .icache_size = 4096, .icache_line_size = 16, @@ -116,7 +116,7 @@ static const struct cputab models[] = { .ci = { .dcache_size = 2048, .dcache_line_size = 16, - .icache_size = 2848, + .icache_size = 2048, .icache_line_size = 16, } }, { @@ -124,7 +124,7 @@ static const struct cputab models[] = { .mask = 0x, .name = "401G2", .ci = { - .dcache_size = 2848, + .dcache_size = 2048, .dcache_line_size = 16, .icache_size = 8192, .icache_line_size = 16,