CVS commit: src/sys/dev/usb
Module Name:src Committed By: riastradh Date: Mon Feb 1 06:59:37 UTC 2021 Modified Files: src/sys/dev/usb: if_urtwn.c Log Message: urtwn(4): Check for allocation failure in urtwn_tx_beacon. Candidate fix for PR kern/55968. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/dev/usb/if_urtwn.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/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.90 src/sys/dev/usb/if_urtwn.c:1.91 --- src/sys/dev/usb/if_urtwn.c:1.90 Mon Feb 1 04:46:33 2021 +++ src/sys/dev/usb/if_urtwn.c Mon Feb 1 06:59:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.90 2021/02/01 04:46:33 nia Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.91 2021/02/01 06:59:37 riastradh Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.90 2021/02/01 04:46:33 nia Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.91 2021/02/01 06:59:37 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -854,6 +854,10 @@ urtwn_tx_beacon(struct urtwn_softc *sc, { struct urtwn_tx_data *data = urtwn_get_tx_data(sc, sc->ac2idx[WME_AC_VO]); + + if (data == NULL) + return ENOBUFS; + return urtwn_tx(sc, m, ni, data); }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nia Date: Mon Feb 1 04:49:02 UTC 2021 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.778 -r1.779 src/sys/dev/usb/usbdevs.h \ src/sys/dev/usb/usbdevs_data.h 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/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.778 src/sys/dev/usb/usbdevs.h:1.779 --- src/sys/dev/usb/usbdevs.h:1.778 Sun Jan 31 18:11:43 2021 +++ src/sys/dev/usb/usbdevs.h Mon Feb 1 04:49:02 2021 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.778 2021/01/31 18:11:43 nia Exp $ */ +/* $NetBSD: usbdevs.h,v 1.779 2021/02/01 04:49:02 nia Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.788 2021/01/31 18:05:38 nia Exp + * NetBSD: usbdevs,v 1.789 2021/02/01 04:46:33 nia Exp */ /*- @@ -3408,8 +3408,9 @@ /* TP-Link products */ #define USB_PRODUCT_TPLINK_RTL8192CU 0x0100 /* RTL8192CU */ -#define USB_PRODUCT_TPLINK_WN821N 0x0107 /* WN821N */ -#define USB_PRODUCT_TPLINK_RTL8192EU 0x0109 /* RTL8192EU */ +#define USB_PRODUCT_TPLINK_WN821NV5 0x0107 /* TL-WN821N v5 */ +#define USB_PRODUCT_TPLINK_WN822NV4 0x0108 /* TL-WN822N v4 */ +#define USB_PRODUCT_TPLINK_WN823NV2 0x0109 /* TL-WN823N v2 */ #define USB_PRODUCT_TPLINK_RTL8188EU 0x010c /* RTL8188EU */ #define USB_PRODUCT_TPLINK_T4UV2 0x010d /* Archer T4U ver 2 */ #define USB_PRODUCT_TPLINK_T4UHV2 0x010e /* Archer T4UH ver 2 */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.778 src/sys/dev/usb/usbdevs_data.h:1.779 --- src/sys/dev/usb/usbdevs_data.h:1.778 Sun Jan 31 18:11:43 2021 +++ src/sys/dev/usb/usbdevs_data.h Mon Feb 1 04:49:02 2021 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.778 2021/01/31 18:11:43 nia Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.779 2021/02/01 04:49:02 nia Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.788 2021/01/31 18:05:38 nia Exp + * NetBSD: usbdevs,v 1.789 2021/02/01 04:46:33 nia Exp */ /*- @@ -4666,72 +4666,74 @@ static const uint16_t usb_products[] = { 8781, 6564, 5057, 5827, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_RTL8192CU, 5236, 0, - USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_WN821N, - 19667, 0, - USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_RTL8192EU, - 17202, 0, + USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_WN821NV5, + 19667, 19677, 0, + USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_WN822NV4, + 19680, 18556, 0, + USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_WN823NV2, + 19690, 7588, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_RTL8188EU, 5246, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_T4UV2, - 19674, 19681, 7599, 6589, 0, + 19700, 19707, 7599, 6589, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_T4UHV2, - 19674, 19685, 7599, 6589, 0, + 19700, 19711, 7599, 6589, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_T2UNANO, - 19674, 19690, 6940, 0, + 19700, 19716, 6940, 0, USB_VENDOR_TREK, USB_PRODUCT_TREK_THUMBDRIVE, - 19694, 0, + 19720, 0, USB_VENDOR_TREK, USB_PRODUCT_TREK_THUMBDRIVE_8MB, - 19694, 19705, 0, + 19720, 19731, 0, USB_VENDOR_TRENDNET, USB_PRODUCT_TRENDNET_RTL8192CU, 5236, 0, USB_VENDOR_TRENDNET, USB_PRODUCT_TRENDNET_RTL8188CU, 5256, 0, USB_VENDOR_TRIPPLITE, USB_PRODUCT_TRIPPLITE_U209, - 19709, 7000, 4961, 0, + 19735, 7000, 4961, 0, USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_UPS, 3200, 3206, 480, 0, USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_SMARTLCD, - 19714, 480, 0, + 19740, 480, 0, USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_AVR550U, - 3200, 3206, 19723, 0, + 3200, 3206, 19749, 0, USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_T33521, - 19731, 19739, 0, + 19757, 19765, 0, USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_XXX1100, - 16073, 19747, 0, + 16073, 19773, 0, USB_VENDOR_TSUNAMI, USB_PRODUCT_TSUNAMI_SM2000, - 19752, 0, + 19778, 0, USB_VENDOR_TWINMOS, USB_PRODUCT_TWINMOS_G240, - 19760, 0, + 19786, 0, USB_VENDOR_ULTIMA, USB_PRODUCT_ULTIMA_1200UBPLUS, 11355, 14962, 11245, 7301, 0, USB_VENDOR_ULTIMA, USB_PRODUCT_ULTIMA_T14BR, - 19765, 19771, 6910, 0, + 19791, 19797, 6910, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1236U, - 19777, 5743, 19783, 0, + 19803, 5743, 19809, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1220U, - 19777, 19791, 19783, 0, + 19803, 19817, 19809, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA2000U, - 19777, 19797, 19783, 0, + 19803, 19823, 19809, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA3400, - 19777, 19803, 19783, 0, + 19803, 19829, 19809, 0,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nia Date: Mon Feb 1 04:46:33 UTC 2021 Modified Files: src/sys/dev/usb: if_urtwn.c usbdevs Log Message: add another TPLINK RTL8192EU variant to avoid confusion use TP-Link's names for these variants, matching FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/dev/usb/if_urtwn.c cvs rdiff -u -r1.788 -r1.789 src/sys/dev/usb/usbdevs 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/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.89 src/sys/dev/usb/if_urtwn.c:1.90 --- src/sys/dev/usb/if_urtwn.c:1.89 Sun Jan 31 18:05:38 2021 +++ src/sys/dev/usb/if_urtwn.c Mon Feb 1 04:46:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.89 2021/01/31 18:05:38 nia Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.90 2021/02/01 04:46:33 nia Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.89 2021/01/31 18:05:38 nia Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.90 2021/02/01 04:46:33 nia Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -217,8 +217,9 @@ static const struct urtwn_dev { /* URTWN_RTL8192EU */ URTWN_RTL8192EU_DEV(DLINK, DWA131E), URTWN_RTL8192EU_DEV(REALTEK, RTL8192EU), - URTWN_RTL8192EU_DEV(TPLINK, RTL8192EU), - URTWN_RTL8192EU_DEV(TPLINK, WN821N), + URTWN_RTL8192EU_DEV(TPLINK, WN821NV5), + URTWN_RTL8192EU_DEV(TPLINK, WN822NV4), + URTWN_RTL8192EU_DEV(TPLINK, WN823NV2), }; #undef URTWN_DEV #undef URTWN_RTL8188E_DEV Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.788 src/sys/dev/usb/usbdevs:1.789 --- src/sys/dev/usb/usbdevs:1.788 Sun Jan 31 18:05:38 2021 +++ src/sys/dev/usb/usbdevs Mon Feb 1 04:46:33 2021 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.788 2021/01/31 18:05:38 nia Exp $ +$NetBSD: usbdevs,v 1.789 2021/02/01 04:46:33 nia Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -3401,8 +3401,9 @@ product TOSHIBA HSDPA_MODEM_EU870DT1 0x1 /* TP-Link products */ product TPLINK RTL8192CU 0x0100 RTL8192CU -product TPLINK WN821N 0x0107 WN821N -product TPLINK RTL8192EU 0x0109 RTL8192EU +product TPLINK WN821NV5 0x0107 TL-WN821N v5 +product TPLINK WN822NV4 0x0108 TL-WN822N v4 +product TPLINK WN823NV2 0x0109 TL-WN823N v2 product TPLINK RTL8188EU 0x010c RTL8188EU product TPLINK T4UV2 0x010d Archer T4U ver 2 product TPLINK T4UHV2 0x010e Archer T4UH ver 2
CVS commit: src/sys/arch/arm/amlogic
Module Name:src Committed By: jmcneill Date: Mon Feb 1 01:52:05 UTC 2021 Modified Files: src/sys/arch/arm/amlogic: files.meson Log Message: defflag SOC_MESONG12 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/amlogic/files.meson 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/arm/amlogic/files.meson diff -u src/sys/arch/arm/amlogic/files.meson:1.11 src/sys/arch/arm/amlogic/files.meson:1.12 --- src/sys/arch/arm/amlogic/files.meson:1.11 Fri Jan 1 07:21:58 2021 +++ src/sys/arch/arm/amlogic/files.meson Mon Feb 1 01:52:04 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.meson,v 1.11 2021/01/01 07:21:58 ryo Exp $ +# $NetBSD: files.meson,v 1.12 2021/02/01 01:52:04 jmcneill Exp $ # # Configuration info for Amlogic Meson family SoCs # @@ -158,6 +158,7 @@ file arch/arm/amlogic/meson_thermal.c me # SOC parameters defflag opt_soc.h SOC_MESON defflag opt_soc.h SOC_MESON8B: SOC_MESON +defflag opt_soc.h SOC_MESONG12: SOC_MESON defflag opt_soc.h SOC_MESONGX: SOC_MESON defflag opt_soc.h SOC_MESONGXBB: SOC_MESONGX defflag opt_soc.h SOC_MESONGXL: SOC_MESONGX
CVS commit: src/sys/conf
Module Name:src Committed By: rillig Date: Sun Jan 31 23:17:21 UTC 2021 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: sys/conf: remove useless dollars from Makefile.kern.inc When parsing a variable modifier such as :C or :S, all '$' but the very last are silently swallowed. See usr.bin/make/unit-tests/varmod-subst.mk for details. Since August 2020, make has a strict lint mode that is activated by passing it the option -dL. In that mode, these redundant '$' are not accepted anymore. To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.276 src/sys/conf/Makefile.kern.inc:1.277 --- src/sys/conf/Makefile.kern.inc:1.276 Sun Sep 6 07:20:29 2020 +++ src/sys/conf/Makefile.kern.inc Sun Jan 31 23:17:21 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.276 2020/09/06 07:20:29 mrg Exp $ +# $NetBSD: Makefile.kern.inc,v 1.277 2021/01/31 23:17:21 rillig Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -282,7 +282,7 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL # Generate list of *.o files to pass to ${LD}, preserving order. # x/y/z/a.[csS] -> a.[csS] # a.[csS] -> a.o -OBJS= ${ALLFILES:C|^.*/([^/]*\.[csS])$$|\1|:C|^(.*)\.[csS]$$|\1.o|} +OBJS= ${ALLFILES:C|^.*/([^/]*\.[csS])$|\1|:C|^(.*)\.[csS]$|\1.o|} CFILES= ${ALLFILES:M*.c} SFILES= ${ALLFILES:M*.[sS]} @@ -297,7 +297,7 @@ SSRCS= ${_MD_SFILES} ${_SFILES} SRCS= ${CSRCS} ${SSRCS} .else # ___USE_SUFFIX_RULES___ -OBJS= ${ALLFILES:C|\.[csS]$$|.o|} +OBJS= ${ALLFILES:C|\.[csS]$|.o|} SRCS= ${ALLFILES:M*.[csS]} .endif # ___USE_SUFFIX_RULES___
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: rillig Date: Sun Jan 31 22:45:47 UTC 2021 Modified Files: src/usr.sbin/sysinst: bsddisklabel.c checkrc.c configmenu.c defs.h disklabel.c disks.c geom.c gpt.c label.c main.c mbr.c net.c part_edit.c partitions.h partman.c target.c txtwalk.c util.c wskbd.c Log Message: sysinst: remove trailing whitespace from *.c *.h In contrast to the messages files, this whitespace is not significant. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/sysinst/bsddisklabel.c \ src/usr.sbin/sysinst/util.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/checkrc.c cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/sysinst/configmenu.c cvs rdiff -u -r1.69 -r1.70 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.71 -r1.72 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/geom.c cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/main.c cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/sysinst/mbr.c cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/sysinst/net.c cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sysinst/part_edit.c cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/sysinst/partitions.h cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/sysinst/partman.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/target.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/txtwalk.c \ src/usr.sbin/sysinst/wskbd.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.sbin/sysinst/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.56 src/usr.sbin/sysinst/bsddisklabel.c:1.57 --- src/usr.sbin/sysinst/bsddisklabel.c:1.56 Tue Oct 13 17:26:28 2020 +++ src/usr.sbin/sysinst/bsddisklabel.c Sun Jan 31 22:45:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.56 2020/10/13 17:26:28 martin Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.57 2021/01/31 22:45:46 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -386,7 +386,7 @@ inst_ext_clone(menudesc *menu, void *arg struct part_usage_info *p; menu_ent *men; int num_men, i; - + if (!select_partitions(, pm->parts)) return 0; @@ -625,7 +625,7 @@ set_ptn_size(menudesc *m, void *arg) if (is_ram_size) { new_size_val = parse_ram_size(answer, _percent); - if (is_percent && + if (is_percent && (new_size_val < 0 || new_size_val > 100)) continue; if (!is_percent && new_size_val < 0) @@ -1507,7 +1507,7 @@ apply_settings_to_partitions(struct disk want->cur_part_id = new_part_id; want->flags |= PUIFLG_ADD_INNER|PUIFLG_IS_OUTER; - from = roundup(infos[i].start + + from = roundup(infos[i].start + infos[i].size, outer_align); } } @@ -1656,7 +1656,7 @@ apply_settings_to_partitions(struct disk new_part_id = wanted->parts->pscheme-> add_partition( wanted->parts, [i], NULL); - + if (new_part_id == NO_PART) continue; /* failed to add, skip */ } @@ -1818,7 +1818,7 @@ make_bsd_partitions(struct install_parti /* calc available disk area for the NetBSD partitions */ p_start = pm->ptstart; p_size = pm->ptsize; - if (parts->parent != NULL && + if (parts->parent != NULL && parts->parent->pscheme->guess_install_target != NULL) parts->parent->pscheme->guess_install_target( parts->parent, _start, _size); @@ -1826,7 +1826,7 @@ make_bsd_partitions(struct install_parti if (layoutkind == LY_OTHERSCHEME) { parts->pscheme->destroy_part_scheme(parts); return -1; - } else if (layoutkind == LY_USEDEFAULT) { + } else if (layoutkind == LY_USEDEFAULT) { replace_by_default(parts, p_start, p_size, ); } else if (layoutkind == LY_SETSIZES) { @@ -1861,7 +1861,7 @@ make_bsd_partitions(struct install_parti struct disk_part_info info; if (wanted.infos[i].type != PT_root || - strcmp(wanted.infos[i].mount, "/") != 0) + strcmp(wanted.infos[i].mount, "/") != 0) continue; wanted.infos[i].cur_flags |= PTI_INSTALL_TARGET; @@ -1900,7 +1900,7 @@ make_bsd_partitions(struct install_parti daddr_t ps = wanted.infos[i].cur_start; daddr_t pe = ps + wanted.infos[i].size; if (target_start >= 0 && - (ps >= target_start || pe >= target_start)) + (ps >= target_start || pe >= target_start)) continue; boot_part = i; break; Index: src/usr.sbin/sysinst/util.c diff -u src/usr.sbin/sysinst/util.c:1.56 src/usr.sbin/sysinst/util.c:1.57 --- src/usr.sbin/sysinst/util.c:1.56 Tue Nov 10 09:14:01 2020 +++ src/usr.sbin/sysinst/util.c Sun Jan 31 22:45:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.56 2020/11/10 09:14:01 gson Exp $ */ +/* $NetBSD: util.c,v 1.57 2021/01/31 22:45:47 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1370,7 +1370,7 @@
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: rillig Date: Sun Jan 31 22:19:24 UTC 2021 Modified Files: src/usr.sbin/sysinst: msg.mi.de Log Message: sysinst: fix some more typos in the German translation To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/sysinst/msg.mi.de Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.32 src/usr.sbin/sysinst/msg.mi.de:1.33 --- src/usr.sbin/sysinst/msg.mi.de:1.32 Sun Jan 31 21:28:16 2021 +++ src/usr.sbin/sysinst/msg.mi.de Sun Jan 31 22:19:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.32 2021/01/31 21:28:16 rillig Exp $ */ +/* $NetBSD: msg.mi.de,v 1.33 2021/01/31 22:19:24 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1227,11 +1227,11 @@ message doneconfig {Konfiguration abgesc message Install_pkgin {pkgin installieren und Datenbank initialisieren} message binpkg_installed {Das System kann nun Binärpakete mittels pkgin installieren. Um ein Paket zu -installieren, führen Sie den folenden Befehl in einer root-Shell aus: +installieren, führen Sie den folgenden Befehl in einer root-Shell aus: pkgin install -Weitere Informationen finden sich in der pkgin(1)-Manpage.} +Weitere Informationen finden Sie in der pkgin(1)-Manpage.} message Install_pkgsrc {pkgsrc herunterladen und entpacken} message pkgsrc {Welches Protokoll, welcher Host, welches Verzeichnis und welcher User/Passwort
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: rillig Date: Sun Jan 31 21:28:16 UTC 2021 Modified Files: src/usr.sbin/sysinst: msg.mi.de Log Message: sysinst: restore the few intentional line breaks in German Marking a forced line break with a trailing space is a terrible idea. Most of the lines that previously had trailing whitespace did so unintentionally, destroying the auto-layout. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/sysinst/msg.mi.de Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.31 src/usr.sbin/sysinst/msg.mi.de:1.32 --- src/usr.sbin/sysinst/msg.mi.de:1.31 Sun Jan 31 21:00:43 2021 +++ src/usr.sbin/sysinst/msg.mi.de Sun Jan 31 21:28:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.31 2021/01/31 21:00:43 rillig Exp $ */ +/* $NetBSD: msg.mi.de,v 1.32 2021/01/31 21:28:16 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -34,6 +34,8 @@ /* MI Message catalog -- German, machine independent */ +/* NB: Lines ending in spaces force line breaks */ + /* * Use only ASCII characters in this message - it is displayed before the * locale is set up! @@ -601,7 +603,7 @@ Zurück zum vorigen Menü. } message netup -{Die folgenden Netzwerkadapter sind verfügbar: %s +{Die folgenden Netzwerkadapter sind verfügbar: %s Hat einer davon Zugriff auf die benötigten Server?} message asknetdev @@ -642,28 +644,28 @@ message net_media message netok {Nachfolgend sehen Sie die aktuellen Netzwerkeinstellungen. -DNS-Domain: %s -Hostname: %s -Nameserver: %s -Netzwerkadapter: %s -Verbindungstyp: %s -IP-Adresse: %s -Netzmaske: %s -IPv4-Gateway: %s +DNS-Domain: %s +Hostname: %s +Nameserver: %s +Netzwerkadapter: %s +Verbindungstyp: %s +IP-Adresse: %s +Netzmaske: %s +IPv4-Gateway: %s } message netok_slip {Sie haben die folgenden Daten gewählt. Sind diese Daten OK? -DNS-Domain: %s -Hostname: %s -Nameserver: %s -Netzwerkadapter: %s -Verbindungstyp: %s -IP-Adresse: %s -IP-Adresse des Servers: %s -Netzmaske: %s -IPv4-Gateway: %s +DNS-Domain: %s +Hostname: %s +Nameserver: %s +Netzwerkadapter: %s +Verbindungstyp: %s +IP-Adresse: %s +IP-Adresse des Servers: %s +Netzmaske: %s +IPv4-Gateway: %s } message netokv6 @@ -998,8 +1000,8 @@ message choose_timezone Drücken Sie die Eingabetaste, um einen Eintrag anzuwählen. Betätigen Sie danach die Taste 'x' gefolgt von der Eingabetaste, um das Menü zu verlassen. - Vorgabe: %s - Ausgewählt: %s + Vorgabe: %s + Ausgewählt: %s Lokale Zeit: %s %s }
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: rillig Date: Sun Jan 31 21:00:43 UTC 2021 Modified Files: src/usr.sbin/sysinst: msg.mi.de Log Message: sysinst: proofread German translation It was a mixture of all possible styles, with several typos and inconsistencies. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/sysinst/msg.mi.de Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.30 src/usr.sbin/sysinst/msg.mi.de:1.31 --- src/usr.sbin/sysinst/msg.mi.de:1.30 Sun Jan 31 18:31:59 2021 +++ src/usr.sbin/sysinst/msg.mi.de Sun Jan 31 21:00:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.30 2021/01/31 18:31:59 rillig Exp $ */ +/* $NetBSD: msg.mi.de,v 1.31 2021/01/31 21:00:43 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -35,8 +35,8 @@ /* MI Message catalog -- German, machine independent */ /* - * We can not use non ascii characters in this message - it is displayed - * before the locale is set up! + * Use only ASCII characters in this message - it is displayed before the + * locale is set up! */ message sysinst_message_language {Installation auf Deutsch} @@ -68,13 +68,13 @@ message upgrade message hello {Willkommen bei Sysinst, dem Installationsprogramm von NetBSD-@@VERSION@@. -Dieses Programm wird Ihnen helfen, NetBSD auf eine Festplatte zu installieren +Dieses Programm hilft Ihnen, NetBSD auf eine Festplatte zu installieren oder aber eine bereits bestehende Installation von NetBSD zu aktualisieren. In den folgenden Menüs können Sie mit den Buchstaben (a, b, c, ...) die verschiedenen Menüeinträge wählen oder durch Drücken von Strg-N/Strg-P die Markierung auf- oder abbewegen. Die Cursor- und Bildlauftasten (Seite vor/zurück) sollten ebenfalls funktionieren. -Durch Betätigen der Eingabetaste aktivieren Sie die gegenwärtige Auswahl. +Mit der Eingabetaste bestätigen Sie die gegenwärtige Auswahl. } message thanks @@ -107,8 +107,8 @@ Datensicherung durchgeführt haben! Wolle message reinstallusure {Im folgenden werden die NetBSD Distributionssets (Kernel + Basissystem) -auf eine vorbereitete Festplatte ausgepackt. Diese Prozedur lädt und entpackt -die Sets auf eine im Vorfeld partitionierte und bootfähige Festplatte aus. +auf eine vorbereitete Festplatte ausgepackt. Dieser Vorgang lädt und entpackt +die Sets auf eine im Vorfeld partitionierte und bootfähige Festplatte. Es werden weder Festplatten gelabelt, Bootblöcke aktualisiert noch bestehende Konfigurationen gesichert. @@ -116,7 +116,7 @@ Beenden Sie jetzt und wählen Sie dann 'I falls Ihre Festplatte nicht entsprechend vorbereitet ist oder Sie das System neu installieren oder aber ein bestehendes aktualisieren möchten! -Wollen Sie die NetBSD Distributionssets wirklich erneut installieren? +Wollen Sie die NetBSD-Distributionssets wirklich erneut installieren? (Dies ist die letzte Warnung, bevor die Inhalte Ihres Dateisystems überschrieben werden!) } @@ -126,13 +126,13 @@ message mount_failed } message nodisk -{Ich kann keine für NetBSD nutzbaren Festplatten finden. +{Keine für NetBSD nutzbaren Festplatten gefunden. Zurück zum Hauptmenü... } message onedisk -{Ich habe nur eine Festplatte, %s, gefunden. Ich gehe somit davon aus, dass -Sie NetBSD darauf %s möchten. +{Es wurde nur eine Festplatte, %s, gefunden. Wahrscheinlich möchten Sie +NetBSD daher darauf %s. } message ask_disk @@ -183,7 +183,7 @@ aber die Standard-Partitionen verwenden. * $5 = install with X min. 427M */ message layout_prologue_existing -{Falls Sie nicht die existierende Partitionen weiterverwenden möchten, +{Falls Sie die bestehenden Partitionen nicht mehr weiterverwenden möchten, können Sie die Größe der NetBSD-Partitionen neu definieren oder aber alle verwerfen und die Standard-Partitionsgrößen verwenden.} @@ -209,7 +209,7 @@ $5 Megabyte bei Installation der X-Windo message Choose_your_size_specifier {Wenn Sie Mega- oder Gigabytes wählen, werden effektive Partitionsgrößen festgesetzt, die nahe Ihrer Größenangabe liegen. -Bei modernen Festplatten spielen Zylindergrößen keine Roole. +Bei modernen Festplatten spielen Zylindergrößen keine Rolle. Bei älteren Festplatten dagegen ist es am effizientesten, sich Partitionsgrößen auszusuchen, die exakt ein Vielfaches der aktuellen Zylindergröße ausmachen. @@ -221,7 +221,7 @@ Wählen Sie die Einheit} message ptnsizes {Sie können jetzt die Größen der Systempartitionen verändern. Standardmäßig wird der gesamte Speicherplatz der Rootpartition zugeordnet. Wenn Sie -wollen, können Sie separate Partitionen definieren, z.B. /usr (zusätzliche +möchten, können Sie separate Partitionen definieren, z.B. /usr (zusätzliche Systemdateien), /var (Log- bzw. Protokolldateien und anderes) oder /home (Verzeichnis für die persönlichen Dateien der Anwender). @@ -229,10 +229,10
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: rillig Date: Sun Jan 31 20:51:04 UTC 2021 Modified Files: src/usr.sbin/sysinst: factor.c Log Message: sysinst: warp factor.c to the 21st century That file contained some conditionally defined code that still used old-style function definitions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/factor.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.sbin/sysinst/factor.c diff -u src/usr.sbin/sysinst/factor.c:1.1 src/usr.sbin/sysinst/factor.c:1.2 --- src/usr.sbin/sysinst/factor.c:1.1 Sat Jul 26 19:30:44 2014 +++ src/usr.sbin/sysinst/factor.c Sun Jan 31 20:51:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: factor.c,v 1.1 2014/07/26 19:30:44 dholland Exp $ */ +/* $NetBSD: factor.c,v 1.2 2021/01/31 20:51:04 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -32,10 +32,7 @@ * */ -/* Prototypes for strict prototyping. */ - #include - #include @@ -55,8 +52,7 @@ static void build_primes (long max); void factor (long val, long *fact_list, int fact_size, int *num_fact); static void -build_primes(max) - long max; +build_primes(long max) { long pc; int j; @@ -83,15 +79,11 @@ build_primes(max) } /* factor: prepare a list of prime factors of val. - The last number may not be a prime factor is the list is not + The last number may not be a prime factor if the list is not long enough. */ void -factor(val, fact_list, fact_size, num_fact) - long val; - long *fact_list; - int fact_size; - int *num_fact; +factor(long val, long *fact_list, int fact_size, int *num_fact) { int i;
CVS commit: src/sys/arch/sparc64/doc
Module Name:src Committed By: palle Date: Sun Jan 31 19:08:05 UTC 2021 Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: sun4v: update TODO with analysis of sun4v crashes To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 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.31 src/sys/arch/sparc64/doc/TODO:1.32 --- src/sys/arch/sparc64/doc/TODO:1.31 Mon Jan 4 15:13:50 2021 +++ src/sys/arch/sparc64/doc/TODO Sun Jan 31 19:08:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: TODO,v 1.31 2021/01/04 15:13:50 skrll Exp $ */ +/* $NetBSD: TODO,v 1.32 2021/01/31 19:08:05 palle Exp $ */ Things to be done: @@ -11,9 +11,22 @@ sun4u: - GENERIC.UP kernel hangs on v445 (missing interrupt?) sun4v: - - current status: The kernel boots and starts the init process. - The following processes seem to crash on and on so more debugging to be done... - + - current status: + The kernel boots and starts userland. + During the execution of the sysinst process, a sub-process crashes. + The crash happens when a call to sysctl from /bin/sh causes a mmu trap. + Part of the TRAP_SETUP() call in sun4v_datatrap issues a 'save' instruction. + Since %cansave is 0 (%canrestore is 6 and %otherwin is 0) a SPILL trap is generated. + The current code ends up in the pcbspill codepath (which is based on code from openbsd). + This code assumes that it is the register window in the OTHERWIN window that must be spilled + to the pcb. + Since %otherwin in this scenario actually is zero, we end up putting incorrect register + window values to the pcb. + So - this code should not save data to the pcb when %otherwin is 0 - it should spill the + values to the stack of the user process. Special care should be taken here, since we + may end up with a mmu fault again if the stack address is not present in the mmu, so + perhaps spilling to the physical address of the stack will work. + Time will show if this is correct... - 64-bit kernel support - 32-bit kernel support - libkvm
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: rillig Date: Sun Jan 31 18:31:59 UTC 2021 Modified Files: src/usr.sbin/sysinst: msg.mi.de Log Message: sysinst: fix German translation, remove more trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/sysinst/msg.mi.de Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.29 src/usr.sbin/sysinst/msg.mi.de:1.30 --- src/usr.sbin/sysinst/msg.mi.de:1.29 Sun Jan 31 18:22:11 2021 +++ src/usr.sbin/sysinst/msg.mi.de Sun Jan 31 18:31:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.29 2021/01/31 18:22:11 rillig Exp $ */ +/* $NetBSD: msg.mi.de,v 1.30 2021/01/31 18:31:59 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1140,7 +1140,7 @@ message Device {Gerät} message File_system {Dateisystem} message Select_DNS_server { Auswählen eines DNS Servers} message other {andere } -message Perform_autoconfiguration {Führen Sie die automatische Konfiguration?} +message Perform_autoconfiguration {Automatische Konfiguration durchführen?} message Root_shell {Root-Shell} message User_shell {User-Shell} message Color_scheme {Farbschema} @@ -1219,15 +1219,15 @@ message enable_xdm {xdm aktivieren} message enable_cgd {cgd aktivieren} message enable_lvm {lvm aktivieren} message enable_raid {raidframe aktivieren} -message add_a_user {Add a user} +message add_a_user {Benutzer hinzufügen} message configmenu {Zusätzliche Einstellungen konfigurieren.} message doneconfig {Konfiguration abgeschlossen.} message Install_pkgin {pkgin installieren und Datenbank initialisieren} message binpkg_installed {Das System kann nun Binärpakete mittels pkgin installieren. Um ein Paket zu -installieren, muss man folenden Befehl von einer root-Shell ausführen: +installieren, führen Sie den folenden Befehl in einer root-Shell aus: -pkgin install +pkgin install Weitere Informationen finden sich in der pkgin(1)-Manpage.} message Install_pkgsrc {pkgsrc herunterladen und entpacken} @@ -1239,8 +1239,8 @@ gesetzt wird, dann wird kein Passwort be } message Pkgsrc_dir {pkgsrc-Verzeichnis} message get_pkgsrc {pkgsrc herunterladen und extrahieren} -message retry_pkgsrc_network {Netzwerkkonfiguration fehlgeschlagen. Noch einmal -versuchen?} +message retry_pkgsrc_network +{Netzwerkkonfiguration fehlgeschlagen. Noch einmal versuchen?} message quit_pkgsrc {Ohne Installation von pkgsrc beenden.} message quit_pkgs_install {Installation von binär-Paketen beenden.} message pkgin_failed @@ -1292,10 +1292,10 @@ message parttype_only_disklabel {disklab message select_part_scheme {Dieses Gerät wurde anscheinend noch nicht partitioniert. -Bitte wählen Sie ein Partitionierungsverfahren. } +Bitte wählen Sie ein Partitionierungsverfahren.} message select_other_partscheme -{Bitte wählen Sie ein anderes Partitionierungsverfahren. } +{Bitte wählen Sie ein anderes Partitionierungsverfahren.} message select_part_limit {Einige Verfahren können nur den Anfang einer große Festplatte verwalten,
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: rillig Date: Sun Jan 31 18:22:12 UTC 2021 Modified Files: src/usr.sbin/sysinst: msg.mi.de Log Message: sysinst: remove trailing whitespace in German translation To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/sysinst/msg.mi.de Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.28 src/usr.sbin/sysinst/msg.mi.de:1.29 --- src/usr.sbin/sysinst/msg.mi.de:1.28 Thu Nov 5 11:10:11 2020 +++ src/usr.sbin/sysinst/msg.mi.de Sun Jan 31 18:22:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.28 2020/11/05 11:10:11 martin Exp $ */ +/* $NetBSD: msg.mi.de,v 1.29 2021/01/31 18:22:11 rillig Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -73,7 +73,7 @@ oder aber eine bereits bestehende Instal In den folgenden Menüs können Sie mit den Buchstaben (a, b, c, ...) die verschiedenen Menüeinträge wählen oder durch Drücken von Strg-N/Strg-P die Markierung auf- oder abbewegen. Die Cursor- und Bildlauftasten -(Seite vor/zurück) sollten ebenfalls funktionieren. +(Seite vor/zurück) sollten ebenfalls funktionieren. Durch Betätigen der Eingabetaste aktivieren Sie die gegenwärtige Auswahl. } @@ -100,7 +100,7 @@ Wollen Sie fortfahren? message upgradeusure {Sie möchten das auf der Festplatte befindliche NetBSD-System aktualisieren. -Zu diesem Zeitpunkt sollten Sie bereits eine vollständige +Zu diesem Zeitpunkt sollten Sie bereits eine vollständige Datensicherung durchgeführt haben! Wollen Sie NetBSD wirklich aktualisieren? (Dies ist die letzte Warnung, bevor Ihre Festplatte(n) modifiziert werden.) } @@ -132,7 +132,7 @@ Zurück zum Hauptmenü... message onedisk {Ich habe nur eine Festplatte, %s, gefunden. Ich gehe somit davon aus, dass -Sie NetBSD darauf %s möchten. +Sie NetBSD darauf %s möchten. } message ask_disk @@ -220,7 +220,7 @@ Wählen Sie die Einheit} message ptnsizes {Sie können jetzt die Größen der Systempartitionen verändern. Standardmäßig -wird der gesamte Speicherplatz der Rootpartition zugeordnet. Wenn Sie +wird der gesamte Speicherplatz der Rootpartition zugeordnet. Wenn Sie wollen, können Sie separate Partitionen definieren, z.B. /usr (zusätzliche Systemdateien), /var (Log- bzw. Protokolldateien und anderes) oder /home (Verzeichnis für die persönlichen Dateien der Anwender). @@ -275,12 +275,12 @@ message fssizesbad message startoutsidedisk {Der Startwert, den Sie angegeben haben, liegt jenseits des Endes der -Festplatte. +Festplatte. } message endoutsidedisk {Mit diesem Wert liegt das Ende der Partition jenseits des Endes der -Festplatte. +Festplatte. Die Größe Ihrer Partition wurde verringert.} /* Called with:Example @@ -419,14 +419,14 @@ Möchten Sie fortfahren? } message disksetupdone -{Der erste Teil der Installation ist nun abgeschlossen. +{Der erste Teil der Installation ist nun abgeschlossen. Sysinst hat das von Ihnen gewählte Ziellaufwerk partitioniert und auf allen von Ihnen gewählten Partitionen ein Dateisystem initialisiert und geprüft. } message disksetupdoneupdate -{Der erste Teil der Prozedur ist nun abgeschlossen. +{Der erste Teil der Prozedur ist nun abgeschlossen. Sysinst hat das von Ihnen gewählte Ziellaufwerk partitioniert und und alle gewählten Dateisysteme auf Fehler überprüft. } @@ -481,15 +481,15 @@ beendet. Sie sollten nun die Anweisungen im INSTALL Dokument beachten, um Ihr System Ihrer Konfiguration entsprechend einzurichten. Die afterboot(8) Manpage kann ebenfalls nützlich sein. - + Zumindest müssen Sie die Datei rc.conf editieren, so daß die gewünschten Dienste gestartet werden. Vergessen Sie nicht, rc_configured=NO auf -rc_configured=YES umzustellen. +rc_configured=YES umzustellen. } message distmedium {Ihre Festplatte ist nun bereit für die Installation der Kernel- und -Distributionspakete. Wie im INSTALL-Dokument beschrieben, haben Sie nun +Distributionspakete. Wie im INSTALL-Dokument beschrieben, haben Sie nun mehrere Optionen. Für FTP oder NFS müssen Sie mit einem Netzwerk verbunden sein und Zugriff auf die entsprechenden Server haben. @@ -551,9 +551,9 @@ die Distribution zu finden ist. } message No_cd_found -{Kein CD Laufwerk enthält eine CD mit den Distributions-Dateien! +{Kein CD Laufwerk enthält eine CD mit den Distributions-Dateien! Geben Sie die korrekten Daten manuel ein, oder legen Sie eine CD -ein und versuchen Sie es erneut. +ein und versuchen Sie es erneut. } message abort_install @@ -601,7 +601,7 @@ Zurück zum vorigen Menü. } message netup -{Die folgenden Netzwerkadapter sind verfügbar: %s +{Die folgenden Netzwerkadapter sind verfügbar: %s Hat einer davon Zugriff auf die benötigten Server?} message asknetdev @@ -642,33 +642,33 @@ message net_media message netok {Nachfolgend sehen Sie die aktuellen
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nia Date: Sun Jan 31 18:11:44 UTC 2021 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.777 -r1.778 src/sys/dev/usb/usbdevs.h \ src/sys/dev/usb/usbdevs_data.h 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/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.777 src/sys/dev/usb/usbdevs.h:1.778 --- src/sys/dev/usb/usbdevs.h:1.777 Sat Dec 26 22:11:20 2020 +++ src/sys/dev/usb/usbdevs.h Sun Jan 31 18:11:43 2021 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.777 2020/12/26 22:11:20 jym Exp $ */ +/* $NetBSD: usbdevs.h,v 1.778 2021/01/31 18:11:43 nia Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.787 2020/12/26 22:09:18 jym Exp + * NetBSD: usbdevs,v 1.788 2021/01/31 18:05:38 nia Exp */ /*- @@ -3408,6 +3408,7 @@ /* TP-Link products */ #define USB_PRODUCT_TPLINK_RTL8192CU 0x0100 /* RTL8192CU */ +#define USB_PRODUCT_TPLINK_WN821N 0x0107 /* WN821N */ #define USB_PRODUCT_TPLINK_RTL8192EU 0x0109 /* RTL8192EU */ #define USB_PRODUCT_TPLINK_RTL8188EU 0x010c /* RTL8188EU */ #define USB_PRODUCT_TPLINK_T4UV2 0x010d /* Archer T4U ver 2 */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.777 src/sys/dev/usb/usbdevs_data.h:1.778 --- src/sys/dev/usb/usbdevs_data.h:1.777 Sat Dec 26 22:11:20 2020 +++ src/sys/dev/usb/usbdevs_data.h Sun Jan 31 18:11:43 2021 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.777 2020/12/26 22:11:20 jym Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.778 2021/01/31 18:11:43 nia Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.787 2020/12/26 22:09:18 jym Exp + * NetBSD: usbdevs,v 1.788 2021/01/31 18:05:38 nia Exp */ /*- @@ -4666,70 +4666,72 @@ static const uint16_t usb_products[] = { 8781, 6564, 5057, 5827, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_RTL8192CU, 5236, 0, + USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_WN821N, + 19667, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_RTL8192EU, 17202, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_RTL8188EU, 5246, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_T4UV2, - 19667, 19674, 7599, 6589, 0, + 19674, 19681, 7599, 6589, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_T4UHV2, - 19667, 19678, 7599, 6589, 0, + 19674, 19685, 7599, 6589, 0, USB_VENDOR_TPLINK, USB_PRODUCT_TPLINK_T2UNANO, - 19667, 19683, 6940, 0, + 19674, 19690, 6940, 0, USB_VENDOR_TREK, USB_PRODUCT_TREK_THUMBDRIVE, - 19687, 0, + 19694, 0, USB_VENDOR_TREK, USB_PRODUCT_TREK_THUMBDRIVE_8MB, - 19687, 19698, 0, + 19694, 19705, 0, USB_VENDOR_TRENDNET, USB_PRODUCT_TRENDNET_RTL8192CU, 5236, 0, USB_VENDOR_TRENDNET, USB_PRODUCT_TRENDNET_RTL8188CU, 5256, 0, USB_VENDOR_TRIPPLITE, USB_PRODUCT_TRIPPLITE_U209, - 19702, 7000, 4961, 0, + 19709, 7000, 4961, 0, USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_UPS, 3200, 3206, 480, 0, USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_SMARTLCD, - 19707, 480, 0, + 19714, 480, 0, USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_AVR550U, - 3200, 3206, 19716, 0, + 3200, 3206, 19723, 0, USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_T33521, - 19724, 19732, 0, + 19731, 19739, 0, USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_XXX1100, - 16073, 19740, 0, + 16073, 19747, 0, USB_VENDOR_TSUNAMI, USB_PRODUCT_TSUNAMI_SM2000, - 19745, 0, + 19752, 0, USB_VENDOR_TWINMOS, USB_PRODUCT_TWINMOS_G240, - 19753, 0, + 19760, 0, USB_VENDOR_ULTIMA, USB_PRODUCT_ULTIMA_1200UBPLUS, 11355, 14962, 11245, 7301, 0, USB_VENDOR_ULTIMA, USB_PRODUCT_ULTIMA_T14BR, - 19758, 19764, 6910, 0, + 19765, 19771, 6910, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1236U, - 19770, 5743, 19776, 0, + 19777, 5743, 19783, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1220U, - 19770, 19784, 19776, 0, + 19777, 19791, 19783, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA2000U, - 19770, 19790, 19776, 0, + 19777, 19797, 19783, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA3400, - 19770, 19796, 19776, 0, + 19777, 19803, 19783, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA2100U, - 19770, 19801, 19776, 0, + 19777, 19808, 19783, 0, USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA2200U, - 19770, 19807, 19776, 0, + 19777, 19814, 19783, 0, USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB_A, - 19813, 0, + 19820, 0, USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UB, - 19825, 0, + 19832, 0, USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_TEW429UBC1, - 19825, 9292, 0, + 19832,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nia Date: Sun Jan 31 18:05:38 UTC 2021 Modified Files: src/sys/dev/usb: if_urtwn.c usbdevs Log Message: urtwn(4): add TPLINK WN821N to the list of USB device ids reported by kfmut on the unitedbsd forums. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/dev/usb/if_urtwn.c cvs rdiff -u -r1.787 -r1.788 src/sys/dev/usb/usbdevs 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/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.88 src/sys/dev/usb/if_urtwn.c:1.89 --- src/sys/dev/usb/if_urtwn.c:1.88 Sat Jun 27 14:34:45 2020 +++ src/sys/dev/usb/if_urtwn.c Sun Jan 31 18:05:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.88 2020/06/27 14:34:45 jdolecek Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.89 2021/01/31 18:05:38 nia Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.88 2020/06/27 14:34:45 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.89 2021/01/31 18:05:38 nia Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -218,6 +218,7 @@ static const struct urtwn_dev { URTWN_RTL8192EU_DEV(DLINK, DWA131E), URTWN_RTL8192EU_DEV(REALTEK, RTL8192EU), URTWN_RTL8192EU_DEV(TPLINK, RTL8192EU), + URTWN_RTL8192EU_DEV(TPLINK, WN821N), }; #undef URTWN_DEV #undef URTWN_RTL8188E_DEV Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.787 src/sys/dev/usb/usbdevs:1.788 --- src/sys/dev/usb/usbdevs:1.787 Sat Dec 26 22:09:18 2020 +++ src/sys/dev/usb/usbdevs Sun Jan 31 18:05:38 2021 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.787 2020/12/26 22:09:18 jym Exp $ +$NetBSD: usbdevs,v 1.788 2021/01/31 18:05:38 nia Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -3401,6 +3401,7 @@ product TOSHIBA HSDPA_MODEM_EU870DT1 0x1 /* TP-Link products */ product TPLINK RTL8192CU 0x0100 RTL8192CU +product TPLINK WN821N 0x0107 WN821N product TPLINK RTL8192EU 0x0109 RTL8192EU product TPLINK RTL8188EU 0x010c RTL8188EU product TPLINK T4UV2 0x010d Archer T4U ver 2
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: jdolecek Date: Sun Jan 31 16:18:22 UTC 2021 Modified Files: src/lib/libc/stdio: fread.c Log Message: for unbuffered I/O arrange for the destination buffer to be filled in one go, instead of triggering long series of 1 byte read(2)s; this speeds up fread() several order of magnitudes for this case, directly proportional to the size of the supplied buffer change adapted from OpenBSD rev. 1.19 fixes PR lib/55808 by Roland Illig To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/stdio/fread.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/stdio/fread.c diff -u src/lib/libc/stdio/fread.c:1.23 src/lib/libc/stdio/fread.c:1.24 --- src/lib/libc/stdio/fread.c:1.23 Sat Feb 22 22:02:46 2020 +++ src/lib/libc/stdio/fread.c Sun Jan 31 16:18:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fread.c,v 1.23 2020/02/22 22:02:46 kamil Exp $ */ +/* $NetBSD: fread.c,v 1.24 2021/01/31 16:18:22 jdolecek Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)fread.c 8.2 (Berkeley) 12/11/93"; #else -__RCSID("$NetBSD: fread.c,v 1.23 2020/02/22 22:02:46 kamil Exp $"); +__RCSID("$NetBSD: fread.c,v 1.24 2021/01/31 16:18:22 jdolecek Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -68,12 +68,38 @@ fread(void *buf, size_t size, size_t cou _DIAGASSERT(buf != NULL); FLOCKFILE(fp); + if (fp->_r < 0) + fp->_r = 0; total = resid; p = buf; - if (fp->_r <= 0) { - /* Nothing to read on enter, refill the buffers. */ - goto refill; + /* + * If we're unbuffered we know that the buffer in fp is empty so + * we can read directly into buf. This is much faster than a + * series of one byte reads into fp->_nbuf. + */ + if ((fp->_flags & __SNBF) != 0) { + while (resid > 0) { + /* set up the buffer */ + fp->_bf._base = fp->_p = (unsigned char *)p; + fp->_bf._size = resid; + + if (__srefill(fp)) { +/* no more input: return partial result */ +count = (total - resid) / size; +break; + } + p += fp->_r; + resid -= fp->_r; + } + + /* restore the old buffer (see __smakebuf) */ + fp->_bf._base = fp->_p = fp->_nbuf; + fp->_bf._size = 1; + fp->_r = 0; + + FUNLOCKFILE(fp); + return (count); } while (resid > (size_t)(r = fp->_r)) { @@ -82,7 +108,6 @@ fread(void *buf, size_t size, size_t cou /* fp->_r = 0 ... done in __srefill */ p += r; resid -= r; -refill: if (__srefill(fp)) { /* no more input: return partial result */ FUNLOCKFILE(fp);
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 16:00:05 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_114.c msg_114.exp Log Message: lint: document that message 108 doesn't abort anymore To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_114.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_114.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/msg_114.c diff -u src/tests/usr.bin/xlint/lint1/msg_114.c:1.3 src/tests/usr.bin/xlint/lint1/msg_114.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_114.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_114.c Sun Jan 31 16:00:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_114.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_114.c,v 1.4 2021/01/31 16:00:05 rillig Exp $ */ # 3 "msg_114.c" // Test for message: %soperand of '%s' must be lvalue [114] @@ -7,7 +7,14 @@ void example(int a) /* expect: 231 */ { 3++; /* expect: 114 */ - // FIXME: lint error: ../common/tyname.c, 190: tspec_name(0) - // "string"++; + + /* + * Before tree.c 1.137 from 2021-01-09, trying to increment an array + * aborted lint with 'common/tyname.c, 190: tspec_name(0)'. + * + * See msg_108.c for more details. + */ + "string"++; /* expect: 108 */ + (a + a)++; /* expect: 114 */ } Index: src/tests/usr.bin/xlint/lint1/msg_114.exp diff -u src/tests/usr.bin/xlint/lint1/msg_114.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_114.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_114.exp:1.2 Fri Jan 8 21:25:03 2021 +++ src/tests/usr.bin/xlint/lint1/msg_114.exp Sun Jan 31 16:00:05 2021 @@ -1,3 +1,4 @@ msg_114.c(9): operand of 'x++' must be lvalue [114] -msg_114.c(12): operand of 'x++' must be lvalue [114] +msg_114.c(17): operand of 'x++' has invalid type (array) [108] +msg_114.c(19): operand of 'x++' must be lvalue [114] msg_114.c(7): warning: argument a unused in function example [231]
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 14:57:28 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_anon_union.c d_c99_complex_split.c d_c99_decls_after_stmt.c d_c99_decls_after_stmt2.c d_c99_decls_after_stmt3.c d_c99_func.c d_c99_nested_struct.c d_c99_recursive_init.c d_c99_union_cast.c d_c99_union_cast.exp d_c99_union_init3.c d_cast_fun_array_param.c d_cast_init.c d_cast_init2.c d_cast_lhs.c d_compound_literals1.c d_compound_literals2.c d_cvt_constant.c d_cvt_constant.exp d_cvt_in_ternary.c d_ellipsis_in_switch.c d_gcc_compound_statements1.c d_gcc_extension.c d_gcc_extension.exp d_gcc_func.c d_gcc_variable_array_init.c d_nested_structs.c d_packed_structs.c d_shift_to_narrower_type.c d_type_question_colon.c d_zero_sized_arrays.c Log Message: lint: format tests in a common style The lint tests do not focus on the whitespace since that is the most boring part of code style. Therefore, format the tests to be readable by following share/misc/style as close as possible. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/d_c99_anon_union.c \ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c \ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c \ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt3.c \ src/tests/usr.bin/xlint/lint1/d_c99_func.c \ src/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c \ src/tests/usr.bin/xlint/lint1/d_c99_union_cast.c \ src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp \ src/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c \ src/tests/usr.bin/xlint/lint1/d_cast_init2.c \ src/tests/usr.bin/xlint/lint1/d_cast_lhs.c \ src/tests/usr.bin/xlint/lint1/d_compound_literals1.c \ src/tests/usr.bin/xlint/lint1/d_compound_literals2.c \ src/tests/usr.bin/xlint/lint1/d_cvt_constant.c \ src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp \ src/tests/usr.bin/xlint/lint1/d_cvt_in_ternary.c \ src/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c \ src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c \ src/tests/usr.bin/xlint/lint1/d_gcc_extension.c \ src/tests/usr.bin/xlint/lint1/d_gcc_func.c \ src/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c \ src/tests/usr.bin/xlint/lint1/d_nested_structs.c \ src/tests/usr.bin/xlint/lint1/d_packed_structs.c \ src/tests/usr.bin/xlint/lint1/d_shift_to_narrower_type.c \ src/tests/usr.bin/xlint/lint1/d_type_question_colon.c \ src/tests/usr.bin/xlint/lint1/d_zero_sized_arrays.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_c99_complex_split.c \ src/tests/usr.bin/xlint/lint1/d_c99_recursive_init.c \ src/tests/usr.bin/xlint/lint1/d_c99_union_init3.c \ src/tests/usr.bin/xlint/lint1/d_cast_init.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/d_gcc_extension.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_anon_union.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_anon_union.c:1.2 src/tests/usr.bin/xlint/lint1/d_c99_anon_union.c:1.3 --- src/tests/usr.bin/xlint/lint1/d_c99_anon_union.c:1.2 Sun Jan 31 14:39:31 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_anon_union.c Sun Jan 31 14:57:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_anon_union.c,v 1.2 2021/01/31 14:39:31 rillig Exp $ */ +/* $NetBSD: d_c99_anon_union.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ # 3 "d_c99_anon_union.c" /* struct with only anonymous members */ @@ -11,8 +11,8 @@ struct foo { }; int -main(void) { - +main(void) +{ struct foo *f = 0; printf("%p\n", [1]); return 0; Index: src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c:1.2 src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c:1.3 --- src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c:1.2 Sun Jan 31 14:39:31 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c Sun Jan 31 14:57:28 2021 @@ -1,8 +1,12 @@ -/* $NetBSD: d_c99_decls_after_stmt.c,v 1.2 2021/01/31 14:39:31 rillig Exp $ */ +/* $NetBSD: d_c99_decls_after_stmt.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ # 3 "d_c99_decls_after_stmt.c" -void sample(void) +void +sample(void) { - int i = 0; i += 1; - int j = 0; j += 1; + int i = 0; + i += 1; + + int j = 0; + j += 1; } Index: src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c:1.2 src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c:1.3 --- src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c:1.2 Sun Jan 31 14:39:31 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c Sun Jan 31 14:57:28 2021 @@ -1,9 +1,16 @@ -/* $NetBSD: d_c99_decls_after_stmt2.c,v 1.2 2021/01/31
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 14:39:31 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_alignof.c d_bltinoffsetof.c d_c99_anon_struct.c d_c99_anon_union.c d_c99_complex_num.c d_c99_complex_split.c d_c99_compound_literal_comma.c d_c99_decls_after_stmt.c d_c99_decls_after_stmt2.c d_c99_decls_after_stmt3.c d_c99_flex_array_packed.c d_c99_for_loops.c d_c99_func.c d_c99_nested_struct.c d_c99_recursive_init.c d_c99_struct_init.c d_c99_union_cast.c d_c99_union_cast.exp d_c99_union_init1.c d_c99_union_init2.c d_c99_union_init3.c d_c99_union_init4.c d_c9x_array_init.c d_c9x_recursive_init.c d_cast_fun_array_param.c d_cast_init.c d_cast_init2.c d_cast_lhs.c d_cast_typeof.c d_compound_literals1.c d_compound_literals2.c d_constant_conv1.c d_constant_conv1.exp d_constant_conv2.c d_constant_conv2.exp d_cvt_constant.c d_cvt_constant.exp d_cvt_in_ternary.c d_ellipsis_in_switch.c d_gcc_compound_statements1.c d_gcc_compound_statements2.c d_gcc_compound_statements3.c d_gcc_extension.c d_gcc_extension.exp d_gcc_func.c d_gcc_variable_array_init.c d_incorrect_array_size.c d_incorrect_array_size.exp d_init_pop_member.c d_init_pop_member.exp d_long_double_int.c d_long_double_int.exp d_nested_structs.c d_nolimit_init.c d_packed_structs.c d_return_type.c d_return_type.exp d_shift_to_narrower_type.c d_struct_init_nested.c d_struct_init_nested.exp d_type_conv1.c d_type_conv1.exp d_type_conv2.c d_type_conv2.exp d_type_conv3.c d_type_conv3.exp d_type_question_colon.c d_typefun.c d_typename_as_var.c d_zero_sized_arrays.c Log Message: lint: add common header for all tests For those tests that didn't use GCC-style line markers such as "# 2", the line numbers of the diagnostics stay the same. This is purely conincidental. Before, the 3 lines came from lint's built-in definitions (see 'builtins' in main1.c), and line number counting continued as if nothing had happened, making the first line of the actual file line 4. These 3 built-in lines are now replaced with 3 lines of file header. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/d_alignof.c \ src/tests/usr.bin/xlint/lint1/d_bltinoffsetof.c \ src/tests/usr.bin/xlint/lint1/d_c99_anon_union.c \ src/tests/usr.bin/xlint/lint1/d_c99_complex_num.c \ src/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c \ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c \ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt2.c \ src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt3.c \ src/tests/usr.bin/xlint/lint1/d_c99_flex_array_packed.c \ src/tests/usr.bin/xlint/lint1/d_c99_func.c \ src/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c \ src/tests/usr.bin/xlint/lint1/d_c99_union_cast.c \ src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp \ src/tests/usr.bin/xlint/lint1/d_c9x_array_init.c \ src/tests/usr.bin/xlint/lint1/d_c9x_recursive_init.c \ src/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c \ src/tests/usr.bin/xlint/lint1/d_cast_init2.c \ src/tests/usr.bin/xlint/lint1/d_cast_lhs.c \ src/tests/usr.bin/xlint/lint1/d_compound_literals1.c \ src/tests/usr.bin/xlint/lint1/d_compound_literals2.c \ src/tests/usr.bin/xlint/lint1/d_constant_conv1.c \ src/tests/usr.bin/xlint/lint1/d_constant_conv1.exp \ src/tests/usr.bin/xlint/lint1/d_constant_conv2.c \ src/tests/usr.bin/xlint/lint1/d_cvt_constant.c \ src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp \ src/tests/usr.bin/xlint/lint1/d_cvt_in_ternary.c \ src/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c \ src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c \ src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c \ src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements3.c \ src/tests/usr.bin/xlint/lint1/d_gcc_extension.c \ src/tests/usr.bin/xlint/lint1/d_gcc_func.c \ src/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c \ src/tests/usr.bin/xlint/lint1/d_incorrect_array_size.c \ src/tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp \ src/tests/usr.bin/xlint/lint1/d_nested_structs.c \ src/tests/usr.bin/xlint/lint1/d_nolimit_init.c \ src/tests/usr.bin/xlint/lint1/d_packed_structs.c \ src/tests/usr.bin/xlint/lint1/d_return_type.c \ src/tests/usr.bin/xlint/lint1/d_return_type.exp \ src/tests/usr.bin/xlint/lint1/d_shift_to_narrower_type.c \ src/tests/usr.bin/xlint/lint1/d_type_conv1.c \ src/tests/usr.bin/xlint/lint1/d_type_conv2.c \ src/tests/usr.bin/xlint/lint1/d_type_conv3.c \ src/tests/usr.bin/xlint/lint1/d_type_question_colon.c \
CVS commit: src/sys/dev/pci
Module Name:src Committed By: reinoud Date: Sun Jan 31 14:17:48 UTC 2021 Modified Files: src/sys/dev/pci: if_vioif.c Log Message: Although the header structure can be smaller, the headers *are* indexed as if they are full sized so allocate enough memory so the indexing works as expected and we are not scribbling outside bounds. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/if_vioif.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/if_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.66 src/sys/dev/pci/if_vioif.c:1.67 --- src/sys/dev/pci/if_vioif.c:1.66 Wed Jan 20 19:46:48 2021 +++ src/sys/dev/pci/if_vioif.c Sun Jan 31 14:17:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.66 2021/01/20 19:46:48 reinoud Exp $ */ +/* $NetBSD: if_vioif.c,v 1.67 2021/01/31 14:17:48 reinoud Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.66 2021/01/20 19:46:48 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.67 2021/01/31 14:17:48 reinoud Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -611,9 +611,9 @@ vioif_alloc_mems(struct vioif_softc *sc) txq = >sc_txq[qid]; rxq->rxq_hdrs = vioif_assign_mem(, - sc->sc_hdr_size * rxq->rxq_vq->vq_num); + sizeof(struct virtio_net_hdr) * rxq->rxq_vq->vq_num); txq->txq_hdrs = vioif_assign_mem(, - sc->sc_hdr_size * txq->txq_vq->vq_num); + sizeof(struct virtio_net_hdr) * txq->txq_vq->vq_num); } if (sc->sc_has_ctrl) { ctrlq->ctrlq_cmd = vioif_assign_mem(,
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jan 31 14:05:00 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_constant_conv2.exp d_gcc_extension.exp d_type_conv1.exp d_type_conv2.exp d_type_conv3.exp msg_259.c msg_259.exp src/usr.bin/xlint/lint1: err.c tree.c Log Message: lint: reword message 259 about function argument conversion The words "due to prototype" are an anachronism from the 1990s. Nowadays every function is defined using a prototype, which makes these words redundant. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp \ src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv1.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv2.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv3.exp cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_259.c \ src/tests/usr.bin/xlint/lint1/msg_259.exp cvs rdiff -u -r1.76 -r1.77 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.203 -r1.204 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_constant_conv2.exp diff -u src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp:1.2 src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp:1.3 --- src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp:1.2 Sun Jan 31 13:56:14 2021 +++ src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp Sun Jan 31 14:05:00 2021 @@ -1 +1 @@ -(11): warning: conversion from 'double' to 'unsigned int' due to prototype, arg #1 [259] +(11): warning: argument #1 is converted from 'double' to 'unsigned int' [259] Index: src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp diff -u src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp:1.2 src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp:1.3 --- src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp:1.2 Sun Jan 31 13:56:14 2021 +++ src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp Sun Jan 31 14:05:00 2021 @@ -1,2 +1,2 @@ -(7): warning: conversion from 'double' to 'long double' due to prototype, arg #1 [259] -(7): warning: conversion from 'double' to 'long double' due to prototype, arg #1 [259] +(7): warning: argument #1 is converted from 'double' to 'long double' [259] +(7): warning: argument #1 is converted from 'double' to 'long double' [259] Index: src/tests/usr.bin/xlint/lint1/d_type_conv1.exp diff -u src/tests/usr.bin/xlint/lint1/d_type_conv1.exp:1.2 src/tests/usr.bin/xlint/lint1/d_type_conv1.exp:1.3 --- src/tests/usr.bin/xlint/lint1/d_type_conv1.exp:1.2 Sun Jan 31 13:56:14 2021 +++ src/tests/usr.bin/xlint/lint1/d_type_conv1.exp Sun Jan 31 14:05:00 2021 @@ -1 +1 @@ -(13): warning: conversion from 'long long' to 'unsigned int' due to prototype, arg #1 [259] +(13): warning: argument #1 is converted from 'long long' to 'unsigned int' [259] Index: src/tests/usr.bin/xlint/lint1/d_type_conv2.exp diff -u src/tests/usr.bin/xlint/lint1/d_type_conv2.exp:1.2 src/tests/usr.bin/xlint/lint1/d_type_conv2.exp:1.3 --- src/tests/usr.bin/xlint/lint1/d_type_conv2.exp:1.2 Sun Jan 31 13:56:14 2021 +++ src/tests/usr.bin/xlint/lint1/d_type_conv2.exp Sun Jan 31 14:05:00 2021 @@ -1 +1 @@ -(13): warning: conversion from 'double' to 'float' due to prototype, arg #1 [259] +(13): warning: argument #1 is converted from 'double' to 'float' [259] Index: src/tests/usr.bin/xlint/lint1/d_type_conv3.exp diff -u src/tests/usr.bin/xlint/lint1/d_type_conv3.exp:1.2 src/tests/usr.bin/xlint/lint1/d_type_conv3.exp:1.3 --- src/tests/usr.bin/xlint/lint1/d_type_conv3.exp:1.2 Sun Jan 31 13:56:14 2021 +++ src/tests/usr.bin/xlint/lint1/d_type_conv3.exp Sun Jan 31 14:05:00 2021 @@ -1,2 +1,2 @@ -(12): warning: conversion from 'long long' to 'unsigned int' due to prototype, arg #1 [259] +(12): warning: argument #1 is converted from 'long long' to 'unsigned int' [259] (12): warning: conversion of 'long long' to 'unsigned int' is out of range, arg #1 [295] Index: src/tests/usr.bin/xlint/lint1/msg_259.c diff -u src/tests/usr.bin/xlint/lint1/msg_259.c:1.3 src/tests/usr.bin/xlint/lint1/msg_259.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_259.c:1.3 Sun Jan 31 13:56:14 2021 +++ src/tests/usr.bin/xlint/lint1/msg_259.c Sun Jan 31 14:05:00 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_259.c,v 1.3 2021/01/31 13:56:14 rillig Exp $ */ +/* $NetBSD: msg_259.c,v 1.4 2021/01/31 14:05:00 rillig Exp $ */ # 3 "msg_259.c" -// Test for message: conversion from '%s' to '%s' due to prototype, arg #%d [259] +// Test for message: argument #%d is converted from '%s' to '%s' [259] /* lint1-extra-flags: -h */ Index: src/tests/usr.bin/xlint/lint1/msg_259.exp diff -u src/tests/usr.bin/xlint/lint1/msg_259.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_259.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_259.exp:1.3 Sun Jan 31 13:56:14 2021 +++ src/tests/usr.bin/xlint/lint1/msg_259.exp Sun Jan 31 14:05:00 2021 @@ -1 +1 @@
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jan 31 13:56:14 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_constant_conv2.exp d_gcc_extension.exp d_type_conv1.exp d_type_conv2.exp d_type_conv3.exp msg_259.c msg_259.exp src/usr.bin/xlint/lint1: err.c tree.c Log Message: lint: make warning about function argument conversion more detailed For every conversion it is useful to know both the source and the target type since these are not always obvious from the code. The only surprise is the warning in d_gcc_extension. The conversion there is from 'double' to 'long double', which is a lossless conversion. This may be a bug in lint. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp \ src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv1.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv2.exp \ src/tests/usr.bin/xlint/lint1/d_type_conv3.exp cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_259.c \ src/tests/usr.bin/xlint/lint1/msg_259.exp cvs rdiff -u -r1.75 -r1.76 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.202 -r1.203 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_constant_conv2.exp diff -u src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp:1.1 src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp:1.2 --- src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp:1.1 Mon Dec 28 09:58:56 2020 +++ src/tests/usr.bin/xlint/lint1/d_constant_conv2.exp Sun Jan 31 13:56:14 2021 @@ -1 +1 @@ -(11): warning: conversion to 'unsigned int' due to prototype, arg #1 [259] +(11): warning: conversion from 'double' to 'unsigned int' due to prototype, arg #1 [259] Index: src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp diff -u src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp:1.1 src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp:1.2 --- src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp:1.1 Mon Dec 28 12:47:39 2020 +++ src/tests/usr.bin/xlint/lint1/d_gcc_extension.exp Sun Jan 31 13:56:14 2021 @@ -1,2 +1,2 @@ -(7): warning: conversion to 'long double' due to prototype, arg #1 [259] -(7): warning: conversion to 'long double' due to prototype, arg #1 [259] +(7): warning: conversion from 'double' to 'long double' due to prototype, arg #1 [259] +(7): warning: conversion from 'double' to 'long double' due to prototype, arg #1 [259] Index: src/tests/usr.bin/xlint/lint1/d_type_conv1.exp diff -u src/tests/usr.bin/xlint/lint1/d_type_conv1.exp:1.1 src/tests/usr.bin/xlint/lint1/d_type_conv1.exp:1.2 --- src/tests/usr.bin/xlint/lint1/d_type_conv1.exp:1.1 Mon Dec 28 09:58:56 2020 +++ src/tests/usr.bin/xlint/lint1/d_type_conv1.exp Sun Jan 31 13:56:14 2021 @@ -1 +1 @@ -(13): warning: conversion to 'unsigned int' due to prototype, arg #1 [259] +(13): warning: conversion from 'long long' to 'unsigned int' due to prototype, arg #1 [259] Index: src/tests/usr.bin/xlint/lint1/d_type_conv2.exp diff -u src/tests/usr.bin/xlint/lint1/d_type_conv2.exp:1.1 src/tests/usr.bin/xlint/lint1/d_type_conv2.exp:1.2 --- src/tests/usr.bin/xlint/lint1/d_type_conv2.exp:1.1 Mon Dec 28 09:58:56 2020 +++ src/tests/usr.bin/xlint/lint1/d_type_conv2.exp Sun Jan 31 13:56:14 2021 @@ -1 +1 @@ -(13): warning: conversion to 'float' due to prototype, arg #1 [259] +(13): warning: conversion from 'double' to 'float' due to prototype, arg #1 [259] Index: src/tests/usr.bin/xlint/lint1/d_type_conv3.exp diff -u src/tests/usr.bin/xlint/lint1/d_type_conv3.exp:1.1 src/tests/usr.bin/xlint/lint1/d_type_conv3.exp:1.2 --- src/tests/usr.bin/xlint/lint1/d_type_conv3.exp:1.1 Mon Dec 28 09:58:56 2020 +++ src/tests/usr.bin/xlint/lint1/d_type_conv3.exp Sun Jan 31 13:56:14 2021 @@ -1,2 +1,2 @@ -(12): warning: conversion to 'unsigned int' due to prototype, arg #1 [259] +(12): warning: conversion from 'long long' to 'unsigned int' due to prototype, arg #1 [259] (12): warning: conversion of 'long long' to 'unsigned int' is out of range, arg #1 [295] Index: src/tests/usr.bin/xlint/lint1/msg_259.c diff -u src/tests/usr.bin/xlint/lint1/msg_259.c:1.2 src/tests/usr.bin/xlint/lint1/msg_259.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_259.c:1.2 Sat Jan 30 22:07:31 2021 +++ src/tests/usr.bin/xlint/lint1/msg_259.c Sun Jan 31 13:56:14 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_259.c,v 1.2 2021/01/30 22:07:31 rillig Exp $ */ +/* $NetBSD: msg_259.c,v 1.3 2021/01/31 13:56:14 rillig Exp $ */ # 3 "msg_259.c" -// Test for message: conversion to '%s' due to prototype, arg #%d [259] +// Test for message: conversion from '%s' to '%s' due to prototype, arg #%d [259] /* lint1-extra-flags: -h */ Index: src/tests/usr.bin/xlint/lint1/msg_259.exp diff -u src/tests/usr.bin/xlint/lint1/msg_259.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_259.exp:1.3 ---
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 13:33:11 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_217.c msg_217.exp Log Message: lint: demonstrate wrong and misleading warnings about reachability To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_217.c \ src/tests/usr.bin/xlint/lint1/msg_217.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/msg_217.c diff -u src/tests/usr.bin/xlint/lint1/msg_217.c:1.2 src/tests/usr.bin/xlint/lint1/msg_217.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_217.c:1.2 Sat Jan 30 17:02:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_217.c Sun Jan 31 13:33:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_217.c,v 1.2 2021/01/30 17:02:58 rillig Exp $ */ +/* $NetBSD: msg_217.c,v 1.3 2021/01/31 13:33:10 rillig Exp $ */ # 3 "msg_217.c" // Test for message: function %s falls off bottom without returning value [217] @@ -9,3 +9,24 @@ random(int n) if (n < 0) return -3; }/* expect: 217 */ + +/* + * The pattern 'do { } while (0)' is often used in statement macros. + * Putting a 'return' at the end of such a macro is legitimate, the embracing + * 'do { } while (0)' is probably there to conform to a coding standard or + * to otherwise reduce confusion. + * + * Seen in external/bsd/libevent/dist/event_tagging.c, function + * encode_int_internal. + * + * As of 2021-01-31, lint wrongly reports that the function would fall off + * the bottom, but it cannot reach the bottom since every path contains the + * 'return i'. + */ +int +do_while_return(int i) +{ + do { + return i; + } while (/*CONSTCOND*/0); /*FIXME*//* expect: 193 */ +} /*FIXME*//* expect: 217 */ Index: src/tests/usr.bin/xlint/lint1/msg_217.exp diff -u src/tests/usr.bin/xlint/lint1/msg_217.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_217.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_217.exp:1.2 Sat Jan 30 17:02:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_217.exp Sun Jan 31 13:33:10 2021 @@ -1 +1,3 @@ msg_217.c(11): warning: function random falls off bottom without returning value [217] +msg_217.c(31): warning: statement not reached [193] +msg_217.c(32): warning: function do_while_return falls off bottom without returning value [217]
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 13:11:08 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_166.c msg_166.exp Log Message: lint: add test for lossy assignments to bit-fields (164, 166) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_166.c \ src/tests/usr.bin/xlint/lint1/msg_166.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/msg_166.c diff -u src/tests/usr.bin/xlint/lint1/msg_166.c:1.1 src/tests/usr.bin/xlint/lint1/msg_166.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_166.c:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_166.c Sun Jan 31 13:11:08 2021 @@ -1,7 +1,59 @@ -/* $NetBSD: msg_166.c,v 1.1 2021/01/02 10:22:43 rillig Exp $ */ +/* $NetBSD: msg_166.c,v 1.2 2021/01/31 13:11:08 rillig Exp $ */ # 3 "msg_166.c" // Test for message: precision lost in bit-field assignment [166] -TODO: "Add example code that triggers the above message." -TODO: "Add example code that almost triggers the above message." +/* lint1-extra-flags: -hp */ + +struct bit_set { + + /* + * C99 6.7.2p5 and 6.7.2.1p9 footnote 104 say that for bit-fields of + * underlying type 'int', "it is implementation-defined whether the + * specifier 'int' designates the same type as 'signed int' or the + * same type as 'unsigned int'". + * + * https://gcc.gnu.org/onlinedocs/gcc/Structures-unions-enumerations + * -and-bit-fields-implementation.html says: "By default it is treated + * as 'signed int' but this may be changed by the + * '-funsigned-bitfields' option". + * + * Clang doesn't document implementation-defined behavior, see + * https://bugs.llvm.org/show_bug.cgi?id=11272. + */ + + int minus_1_to_0: 1; /* expect: 34 */ + int minus_8_to_7: 4; /* expect: 34 */ + unsigned zero_to_1: 1; + unsigned zero_to_15: 4; +}; + +void example(void) { + struct bit_set bits; + + /* Clang doesn't warn about the 1. */ + bits.minus_1_to_0 = -2; /* expect: 166 */ + bits.minus_1_to_0 = -1; + bits.minus_1_to_0 = 0; + bits.minus_1_to_0 = 1; /* expect: 166 */ + bits.minus_1_to_0 = 2; /* expect: 166 */ + + bits.minus_8_to_7 = -9; /* expect: 166 */ + bits.minus_8_to_7 = -8; + bits.minus_8_to_7 = 7; + bits.minus_8_to_7 = 8; /* expect: 166 */ + + /* Clang doesn't warn about the -1. */ + bits.zero_to_1 = -2; /* expect: 164 */ + bits.zero_to_1 = -1; /* expect: 164 */ + bits.zero_to_1 = 0; + bits.zero_to_1 = 1; + bits.zero_to_1 = 2; /* expect: 166 */ + + /* Clang doesn't warn about the -8. */ + bits.zero_to_15 = -9; /* expect: 164 */ + bits.zero_to_15 = -8; /* expect: 164 */ + bits.zero_to_15 = 0; + bits.zero_to_15 = 15; + bits.zero_to_15 = 16; /* expect: 166 */ +} Index: src/tests/usr.bin/xlint/lint1/msg_166.exp diff -u src/tests/usr.bin/xlint/lint1/msg_166.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_166.exp:1.2 --- src/tests/usr.bin/xlint/lint1/msg_166.exp:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_166.exp Sun Jan 31 13:11:08 2021 @@ -1 +1,13 @@ -msg_166.c(6): syntax error ':' [249] +msg_166.c(25): warning: nonportable bit-field type [34] +msg_166.c(26): warning: nonportable bit-field type [34] +msg_166.c(35): warning: precision lost in bit-field assignment [166] +msg_166.c(38): warning: precision lost in bit-field assignment [166] +msg_166.c(39): warning: precision lost in bit-field assignment [166] +msg_166.c(41): warning: precision lost in bit-field assignment [166] +msg_166.c(44): warning: precision lost in bit-field assignment [166] +msg_166.c(47): warning: assignment of negative constant to unsigned type [164] +msg_166.c(48): warning: assignment of negative constant to unsigned type [164] +msg_166.c(51): warning: precision lost in bit-field assignment [166] +msg_166.c(54): warning: assignment of negative constant to unsigned type [164] +msg_166.c(55): warning: assignment of negative constant to unsigned type [164] +msg_166.c(58): warning: precision lost in bit-field assignment [166]
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jan 31 12:44:34 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_161.c msg_161.exp src/usr.bin/xlint/lint1: cgram.y externs1.h func.c init.c tree.c Log Message: lint: don't warn about constant condition in 'do { } while (0)' To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_161.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_161.exp cvs rdiff -u -r1.159 -r1.160 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.64 -r1.65 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.66 -r1.67 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.65 -r1.66 src/usr.bin/xlint/lint1/init.c cvs rdiff -u -r1.201 -r1.202 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/msg_161.c diff -u src/tests/usr.bin/xlint/lint1/msg_161.c:1.3 src/tests/usr.bin/xlint/lint1/msg_161.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_161.c:1.3 Sun Jan 31 12:30:53 2021 +++ src/tests/usr.bin/xlint/lint1/msg_161.c Sun Jan 31 12:44:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_161.c,v 1.3 2021/01/31 12:30:53 rillig Exp $ */ +/* $NetBSD: msg_161.c,v 1.4 2021/01/31 12:44:34 rillig Exp $ */ # 3 "msg_161.c" // Test for message: constant in conditional context [161] @@ -23,14 +23,14 @@ while_0(void) * The pattern 'do { } while (0)' is a common technique to define a * preprocessor macro that behaves like a single statement. There is * nothing unusual or surprising about the constant condition. - * Still, lint warns about it. FIXME don't. + * Before tree.c 1.202 from 2021-01-31, lint warned about it. */ void do_while_0(void) { do { - } while (0); /* expect: 161 */ + } while (0); } void Index: src/tests/usr.bin/xlint/lint1/msg_161.exp diff -u src/tests/usr.bin/xlint/lint1/msg_161.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_161.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_161.exp:1.2 Sun Jan 31 12:29:16 2021 +++ src/tests/usr.bin/xlint/lint1/msg_161.exp Sun Jan 31 12:44:34 2021 @@ -1,4 +1,3 @@ msg_161.c(11): warning: constant in conditional context [161] msg_161.c(18): warning: constant in conditional context [161] -msg_161.c(33): warning: constant in conditional context [161] msg_161.c(41): warning: constant in conditional context [161] Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.159 src/usr.bin/xlint/lint1/cgram.y:1.160 --- src/usr.bin/xlint/lint1/cgram.y:1.159 Sun Jan 31 11:23:01 2021 +++ src/usr.bin/xlint/lint1/cgram.y Sun Jan 31 12:44:34 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.159 2021/01/31 11:23:01 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.160 2021/01/31 12:44:34 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.159 2021/01/31 11:23:01 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.160 2021/01/31 12:44:34 rillig Exp $"); #endif #include @@ -1557,7 +1557,7 @@ statement_list: expr_statement: expr T_SEMI { - expr($1, 0, 0, 0); + expr($1, false, false, false, false); ftflg = false; } | T_SEMI { @@ -1576,7 +1576,7 @@ expr_statement_val: if ($1->tn_op == NAME) $1->tn_sym->s_used = true; $$ = $1; - expr($1, 0, 0, 0); + expr($1, false, false, false, false); ftflg = false; } | non_expr_statement { Index: src/usr.bin/xlint/lint1/externs1.h diff -u src/usr.bin/xlint/lint1/externs1.h:1.64 src/usr.bin/xlint/lint1/externs1.h:1.65 --- src/usr.bin/xlint/lint1/externs1.h:1.64 Sat Jan 30 18:16:45 2021 +++ src/usr.bin/xlint/lint1/externs1.h Sun Jan 31 12:44:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: externs1.h,v 1.64 2021/01/30 18:16:45 rillig Exp $ */ +/* $NetBSD: externs1.h,v 1.65 2021/01/31 12:44:34 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -216,7 +216,7 @@ extern tnode_t *cast(tnode_t *, type_t * extern tnode_t *new_function_argument_node(tnode_t *, tnode_t *); extern tnode_t *new_function_call_node(tnode_t *, tnode_t *); extern val_t *constant(tnode_t *, bool); -extern void expr(tnode_t *, bool, bool, bool); +extern void expr(tnode_t *, bool, bool, bool, bool); extern void check_expr_misc(const tnode_t *, bool, bool, bool, bool, bool, bool); extern bool constant_addr(tnode_t *, sym_t **, ptrdiff_t *); Index: src/usr.bin/xlint/lint1/func.c diff -u src/usr.bin/xlint/lint1/func.c:1.66 src/usr.bin/xlint/lint1/func.c:1.67 --- src/usr.bin/xlint/lint1/func.c:1.66 Sat Jan 30 18:16:45 2021 +++ src/usr.bin/xlint/lint1/func.c Sun Jan 31 12:44:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.66 2021/01/30 18:16:45 rillig Exp $ */ +/* $NetBSD: func.c,v 1.67 2021/01/31 12:44:34 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint)
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 12:30:53 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_161.c Log Message: lint: add expectations to test for message 161 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_161.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_161.c diff -u src/tests/usr.bin/xlint/lint1/msg_161.c:1.2 src/tests/usr.bin/xlint/lint1/msg_161.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_161.c:1.2 Sun Jan 31 12:29:16 2021 +++ src/tests/usr.bin/xlint/lint1/msg_161.c Sun Jan 31 12:30:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_161.c,v 1.2 2021/01/31 12:29:16 rillig Exp $ */ +/* $NetBSD: msg_161.c,v 1.3 2021/01/31 12:30:53 rillig Exp $ */ # 3 "msg_161.c" // Test for message: constant in conditional context [161] @@ -8,14 +8,14 @@ void while_1(void) { - while (1) + while (1) /* expect: 161 */ continue; } void while_0(void) { - while (0) + while (0) /* expect: 161 */ continue; } @@ -30,7 +30,7 @@ do_while_0(void) { do { - } while (0); + } while (0); /* expect: 161 */ } void @@ -38,5 +38,5 @@ do_while_1(void) { do { - } while (1); + } while (1); /* expect: 161 */ }
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 12:29:16 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_161.c msg_161.exp Log Message: lint: add tests for 'constant in conditional context' One of these tests explains why 'do { } while (0)' is so usual that there is no reason to warn about it. That warning will not survive for long. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_161.c \ src/tests/usr.bin/xlint/lint1/msg_161.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/msg_161.c diff -u src/tests/usr.bin/xlint/lint1/msg_161.c:1.1 src/tests/usr.bin/xlint/lint1/msg_161.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_161.c:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_161.c Sun Jan 31 12:29:16 2021 @@ -1,7 +1,42 @@ -/* $NetBSD: msg_161.c,v 1.1 2021/01/02 10:22:43 rillig Exp $ */ +/* $NetBSD: msg_161.c,v 1.2 2021/01/31 12:29:16 rillig Exp $ */ # 3 "msg_161.c" // Test for message: constant in conditional context [161] -TODO: "Add example code that triggers the above message." -TODO: "Add example code that almost triggers the above message." +/* lint1-extra-flags: -h */ + +void +while_1(void) +{ + while (1) + continue; +} + +void +while_0(void) +{ + while (0) + continue; +} + +/* + * The pattern 'do { } while (0)' is a common technique to define a + * preprocessor macro that behaves like a single statement. There is + * nothing unusual or surprising about the constant condition. + * Still, lint warns about it. FIXME don't. + */ +void +do_while_0(void) +{ + do { + + } while (0); +} + +void +do_while_1(void) +{ + do { + + } while (1); +} Index: src/tests/usr.bin/xlint/lint1/msg_161.exp diff -u src/tests/usr.bin/xlint/lint1/msg_161.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_161.exp:1.2 --- src/tests/usr.bin/xlint/lint1/msg_161.exp:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_161.exp Sun Jan 31 12:29:16 2021 @@ -1 +1,4 @@ -msg_161.c(6): syntax error ':' [249] +msg_161.c(11): warning: constant in conditional context [161] +msg_161.c(18): warning: constant in conditional context [161] +msg_161.c(33): warning: constant in conditional context [161] +msg_161.c(41): warning: constant in conditional context [161]
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jan 31 12:20:01 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_160.c msg_160.exp src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix strange message about nested '==' operators If one of the nested subexpressions is parenthesized, the author probably knew how these expressions are evaluated. Therefore don't warn in such a situation. Maybe the original author once made a typo and tried to initialize variables but instead compared them, like this: int a, b, c; a == b == c; This would explain the text of the message, which still sounds strange. At least it doesn't show up as often anymore. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_160.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_160.exp cvs rdiff -u -r1.200 -r1.201 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/msg_160.c diff -u src/tests/usr.bin/xlint/lint1/msg_160.c:1.4 src/tests/usr.bin/xlint/lint1/msg_160.c:1.5 --- src/tests/usr.bin/xlint/lint1/msg_160.c:1.4 Sun Jan 31 11:59:56 2021 +++ src/tests/usr.bin/xlint/lint1/msg_160.c Sun Jan 31 12:20:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_160.c,v 1.4 2021/01/31 11:59:56 rillig Exp $ */ +/* $NetBSD: msg_160.c,v 1.5 2021/01/31 12:20:00 rillig Exp $ */ # 3 "msg_160.c" // Test for message: operator '==' found where '=' was expected [160] @@ -8,8 +8,12 @@ _Bool both_equal_or_unequal(int a, int b, int c, int d) { - /* XXX: Why shouldn't this be legitimate? */ - return (a == b) == (c == d); /* expect: 160, 160 */ + /* + * Before tree.c 1.201 from 2021-01-31, lint warned about each of + * the '==' subexpressions even though there is nothing surprising + * about them. + */ + return (a == b) == (c == d); } void @@ -25,7 +29,12 @@ unparenthesized(int a, int b, int c, _Bo */ eval(a == b == z); /* expect: 160 */ - eval((a == b) == z); /*FIXME*//* expect: 160 */ + /* + * Before tree.c 1.201 from 2021-01-31, lint warned about the + * parenthesized '==' subexpression even though there is nothing + * surprising about it. + */ + eval((a == b) == z); /* * This one is definitely wrong. C, unlike Python, does not chain @@ -34,6 +43,16 @@ unparenthesized(int a, int b, int c, _Bo eval(a == b == c); /* expect: 160 */ /* Parenthesizing one of the operands makes it obvious enough. */ - eval((a == b) == c); /*FIXME*//* expect: 160 */ - eval(a == (b == c)); /*FIXME*//* expect: 160 */ + /* + * Before tree.c 1.201 from 2021-01-31, lint warned about the + * parenthesized '==' subexpression even though there is nothing + * surprising about it. + */ + eval((a == b) == c); + /* + * Before tree.c 1.201 from 2021-01-31, lint warned about the + * parenthesized '==' subexpression even though there is nothing + * surprising about it. + */ + eval(a == (b == c)); } Index: src/tests/usr.bin/xlint/lint1/msg_160.exp diff -u src/tests/usr.bin/xlint/lint1/msg_160.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_160.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_160.exp:1.3 Sun Jan 31 11:59:56 2021 +++ src/tests/usr.bin/xlint/lint1/msg_160.exp Sun Jan 31 12:20:00 2021 @@ -1,7 +1,2 @@ -msg_160.c(12): warning: operator '==' found where '=' was expected [160] -msg_160.c(12): warning: operator '==' found where '=' was expected [160] -msg_160.c(26): warning: operator '==' found where '=' was expected [160] -msg_160.c(28): warning: operator '==' found where '=' was expected [160] -msg_160.c(34): warning: operator '==' found where '=' was expected [160] -msg_160.c(37): warning: operator '==' found where '=' was expected [160] -msg_160.c(38): warning: operator '==' found where '=' was expected [160] +msg_160.c(30): warning: operator '==' found where '=' was expected [160] +msg_160.c(43): warning: operator '==' found where '=' was expected [160] Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.200 src/usr.bin/xlint/lint1/tree.c:1.201 --- src/usr.bin/xlint/lint1/tree.c:1.200 Sun Jan 31 11:44:48 2021 +++ src/usr.bin/xlint/lint1/tree.c Sun Jan 31 12:20:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.200 2021/01/31 11:44:48 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.201 2021/01/31 12:20:00 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.200 2021/01/31 11:44:48 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.201 2021/01/31 12:20:00 rillig Exp $"); #endif #include @@ -4006,7 +4006,9 @@ check_expr_misc(const tnode_t *tn, bool bool cvctx = mp->m_left_value_context; bool ctctx = mp->m_left_test_context; - bool eq = mp->m_warn_if_operand_eq; + bool eq = mp->m_warn_if_operand_eq && + !ln->tn_parenthesized && + rn != NULL &&
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 11:59:57 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_160.c msg_160.exp Log Message: lint: add more test cases for strange '==' warning 160 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_160.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_160.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/msg_160.c diff -u src/tests/usr.bin/xlint/lint1/msg_160.c:1.3 src/tests/usr.bin/xlint/lint1/msg_160.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_160.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_160.c Sun Jan 31 11:59:56 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_160.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_160.c,v 1.4 2021/01/31 11:59:56 rillig Exp $ */ # 3 "msg_160.c" // Test for message: operator '==' found where '=' was expected [160] @@ -9,5 +9,31 @@ _Bool both_equal_or_unequal(int a, int b, int c, int d) { /* XXX: Why shouldn't this be legitimate? */ - return (a == b) == (c == d); /* expect: 160, 160 */ + return (a == b) == (c == d); /* expect: 160, 160 */ +} + +void +eval(_Bool); + +void +unparenthesized(int a, int b, int c, _Bool z) +{ + /* + * This one might be legitimate since the second '==' has _Bool + * on both sides. Parenthesizing its left-hand operand doesn't + * hurt though. + */ + eval(a == b == z); /* expect: 160 */ + + eval((a == b) == z); /*FIXME*//* expect: 160 */ + + /* + * This one is definitely wrong. C, unlike Python, does not chain + * comparison operators in the way mathematicians are used to. + */ + eval(a == b == c); /* expect: 160 */ + + /* Parenthesizing one of the operands makes it obvious enough. */ + eval((a == b) == c); /*FIXME*//* expect: 160 */ + eval(a == (b == c)); /*FIXME*//* expect: 160 */ } Index: src/tests/usr.bin/xlint/lint1/msg_160.exp diff -u src/tests/usr.bin/xlint/lint1/msg_160.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_160.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_160.exp:1.2 Sat Jan 9 15:32:06 2021 +++ src/tests/usr.bin/xlint/lint1/msg_160.exp Sun Jan 31 11:59:56 2021 @@ -1,2 +1,7 @@ msg_160.c(12): warning: operator '==' found where '=' was expected [160] msg_160.c(12): warning: operator '==' found where '=' was expected [160] +msg_160.c(26): warning: operator '==' found where '=' was expected [160] +msg_160.c(28): warning: operator '==' found where '=' was expected [160] +msg_160.c(34): warning: operator '==' found where '=' was expected [160] +msg_160.c(37): warning: operator '==' found where '=' was expected [160] +msg_160.c(38): warning: operator '==' found where '=' was expected [160]
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jan 31 11:44:48 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_117.c msg_117.exp msg_120.c msg_120.exp src/usr.bin/xlint/lint1: check-msgs.lua err.c tree.c Log Message: lint: mention the operator in messages about bit shifts To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_117.c \ src/tests/usr.bin/xlint/lint1/msg_120.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_117.exp \ src/tests/usr.bin/xlint/lint1/msg_120.exp cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/check-msgs.lua cvs rdiff -u -r1.74 -r1.75 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.199 -r1.200 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/msg_117.c diff -u src/tests/usr.bin/xlint/lint1/msg_117.c:1.3 src/tests/usr.bin/xlint/lint1/msg_117.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_117.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_117.c Sun Jan 31 11:44:48 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_117.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_117.c,v 1.4 2021/01/31 11:44:48 rillig Exp $ */ # 3 "msg_117.c" -// Test for message: bitwise operation on signed value possibly nonportable [117] +// Test for message: bitwise '%s' on signed value possibly nonportable [117] /* lint1-extra-flags: -p */ Index: src/tests/usr.bin/xlint/lint1/msg_120.c diff -u src/tests/usr.bin/xlint/lint1/msg_120.c:1.3 src/tests/usr.bin/xlint/lint1/msg_120.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_120.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_120.c Sun Jan 31 11:44:48 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_120.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_120.c,v 1.4 2021/01/31 11:44:48 rillig Exp $ */ # 3 "msg_120.c" -// Test for message: bitwise operation on signed value nonportable [120] +// Test for message: bitwise '%s' on signed value nonportable [120] /* lint1-extra-flags: -p */ Index: src/tests/usr.bin/xlint/lint1/msg_117.exp diff -u src/tests/usr.bin/xlint/lint1/msg_117.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_117.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_117.exp:1.2 Sat Jan 9 14:37:16 2021 +++ src/tests/usr.bin/xlint/lint1/msg_117.exp Sun Jan 31 11:44:48 2021 @@ -1,6 +1,6 @@ -msg_117.c(11): warning: bitwise operation on signed value possibly nonportable [117] -msg_117.c(23): warning: bitwise operation on signed value nonportable [120] -msg_117.c(29): warning: bitwise operation on signed value possibly nonportable [117] +msg_117.c(11): warning: bitwise '>>' on signed value possibly nonportable [117] +msg_117.c(23): warning: bitwise '>>' on signed value nonportable [120] +msg_117.c(29): warning: bitwise '>>' on signed value possibly nonportable [117] msg_117.c(29): warning: shift greater than size of object [122] -msg_117.c(35): warning: bitwise operation on signed value possibly nonportable [117] +msg_117.c(35): warning: bitwise '>>' on signed value possibly nonportable [117] msg_117.c(35): warning: negative shift [121] Index: src/tests/usr.bin/xlint/lint1/msg_120.exp diff -u src/tests/usr.bin/xlint/lint1/msg_120.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_120.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_120.exp:1.2 Sat Jan 9 14:37:16 2021 +++ src/tests/usr.bin/xlint/lint1/msg_120.exp Sun Jan 31 11:44:48 2021 @@ -1,6 +1,6 @@ -msg_120.c(11): warning: bitwise operation on signed value possibly nonportable [117] -msg_120.c(23): warning: bitwise operation on signed value nonportable [120] -msg_120.c(29): warning: bitwise operation on signed value possibly nonportable [117] +msg_120.c(11): warning: bitwise '>>' on signed value possibly nonportable [117] +msg_120.c(23): warning: bitwise '>>' on signed value nonportable [120] +msg_120.c(29): warning: bitwise '>>' on signed value possibly nonportable [117] msg_120.c(29): warning: shift greater than size of object [122] -msg_120.c(35): warning: bitwise operation on signed value possibly nonportable [117] +msg_120.c(35): warning: bitwise '>>' on signed value possibly nonportable [117] msg_120.c(35): warning: negative shift [121] Index: src/usr.bin/xlint/lint1/check-msgs.lua diff -u src/usr.bin/xlint/lint1/check-msgs.lua:1.5 src/usr.bin/xlint/lint1/check-msgs.lua:1.6 --- src/usr.bin/xlint/lint1/check-msgs.lua:1.5 Sat Jan 2 01:12:38 2021 +++ src/usr.bin/xlint/lint1/check-msgs.lua Sun Jan 31 11:44:48 2021 @@ -1,5 +1,5 @@ #! /usr/bin/lua --- $NetBSD: check-msgs.lua,v 1.5 2021/01/02 01:12:38 rillig Exp $ +-- $NetBSD: check-msgs.lua,v 1.6 2021/01/31 11:44:48 rillig Exp $ --[[ @@ -41,7 +41,6 @@ local function check_message(fname, line msg = string.gsub(msg, "\\(.)", "%1") comment = string.gsub(comment, "arg%.", "argument") - comment = string.gsub(comment, "bitop%.", "bitwise
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jan 31 11:23:02 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_001.c msg_001.exp msg_019.c msg_019.exp msg_035.exp src/usr.bin/xlint/lint1: cgram.y decl.c err.c Log Message: lint: add quotes to messages 1 and 19 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_001.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_001.exp \ src/tests/usr.bin/xlint/lint1/msg_019.c \ src/tests/usr.bin/xlint/lint1/msg_019.exp cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_035.exp cvs rdiff -u -r1.158 -r1.159 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.132 -r1.133 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.73 -r1.74 src/usr.bin/xlint/lint1/err.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_001.c diff -u src/tests/usr.bin/xlint/lint1/msg_001.c:1.3 src/tests/usr.bin/xlint/lint1/msg_001.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_001.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_001.c Sun Jan 31 11:23:01 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_001.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_001.c,v 1.4 2021/01/31 11:23:01 rillig Exp $ */ # 3 "msg_001.c" -// Test for message: old style declaration; add int [1] +// Test for message: old style declaration; add 'int' [1] old_style = 1; /* expect: [1] */ Index: src/tests/usr.bin/xlint/lint1/msg_001.exp diff -u src/tests/usr.bin/xlint/lint1/msg_001.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_001.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_001.exp:1.2 Sat Jan 2 18:06:01 2021 +++ src/tests/usr.bin/xlint/lint1/msg_001.exp Sun Jan 31 11:23:01 2021 @@ -1 +1 @@ -msg_001.c(6): warning: old style declaration; add int [1] +msg_001.c(6): warning: old style declaration; add 'int' [1] Index: src/tests/usr.bin/xlint/lint1/msg_019.c diff -u src/tests/usr.bin/xlint/lint1/msg_019.c:1.2 src/tests/usr.bin/xlint/lint1/msg_019.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_019.c:1.2 Sun Jan 31 09:48:47 2021 +++ src/tests/usr.bin/xlint/lint1/msg_019.c Sun Jan 31 11:23:01 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_019.c,v 1.2 2021/01/31 09:48:47 rillig Exp $ */ +/* $NetBSD: msg_019.c,v 1.3 2021/01/31 11:23:01 rillig Exp $ */ # 3 "msg_019.c" -// Test for message: void type for %s [19] +// Test for message: void type for '%s' [19] void global_variable; /* expect: 19 */ Index: src/tests/usr.bin/xlint/lint1/msg_019.exp diff -u src/tests/usr.bin/xlint/lint1/msg_019.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_019.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_019.exp:1.2 Sun Jan 31 09:48:47 2021 +++ src/tests/usr.bin/xlint/lint1/msg_019.exp Sun Jan 31 11:23:01 2021 @@ -1,6 +1,6 @@ -msg_019.c(6): void type for global_variable [19] -msg_019.c(8): void type for unit_variable [19] +msg_019.c(6): void type for 'global_variable' [19] +msg_019.c(8): void type for 'unit_variable' [19] msg_019.c(11): void parameter cannot have name: parameter [61] -msg_019.c(13): void type for local_variable [19] +msg_019.c(13): void type for 'local_variable' [19] msg_019.c(11): warning: argument parameter unused in function function [231] msg_019.c(8): warning: static variable unit_variable unused [226] Index: src/tests/usr.bin/xlint/lint1/msg_035.exp diff -u src/tests/usr.bin/xlint/lint1/msg_035.exp:1.6 src/tests/usr.bin/xlint/lint1/msg_035.exp:1.7 --- src/tests/usr.bin/xlint/lint1/msg_035.exp:1.6 Sun Jan 3 16:59:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_035.exp Sun Jan 31 11:23:01 2021 @@ -5,7 +5,7 @@ msg_035.c(44): warning: illegal bit-fiel msg_035.c(47): warning: illegal bit-field type [35] msg_035.c(48): warning: illegal bit-field type [35] msg_035.c(49): warning: illegal bit-field type [35] -msg_035.c(50): void type for void_flag [19] +msg_035.c(50): void type for 'void_flag' [19] msg_035.c(50): zero size bit-field [37] msg_035.c(51): warning: illegal bit-field type [35] msg_035.c(52): warning: illegal bit-field type [35] Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.158 src/usr.bin/xlint/lint1/cgram.y:1.159 --- src/usr.bin/xlint/lint1/cgram.y:1.158 Sun Jan 31 09:26:27 2021 +++ src/usr.bin/xlint/lint1/cgram.y Sun Jan 31 11:23:01 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.158 2021/01/31 09:26:27 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.159 2021/01/31 11:23:01 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.158 2021/01/31 09:26:27 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.159 2021/01/31 11:23:01 rillig Exp $"); #endif #include @@ -376,10 +376,10 @@ data_def: } | clrtyp deftyp notype_init_decls T_SEMI { if (sflag) { - /* old style declaration; add int
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 11:12:07 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_000.c msg_001.c msg_002.c msg_003.c msg_004.c msg_005.c msg_006.c msg_007.c msg_008.c msg_009.c msg_027.c msg_029.c msg_031.c msg_034.c msg_035.c msg_036.c msg_037.c msg_050.c msg_051.c msg_054.c msg_055.c msg_056.c msg_057.c msg_060.c msg_061.c msg_066.c msg_068.c msg_071.c msg_072.c msg_073.c msg_074.c msg_075.c msg_081.c msg_082.c msg_083.c msg_084.c msg_086.c msg_087.c msg_088.c msg_089.c msg_093.c msg_094.c msg_095.c msg_096.c msg_097.c msg_098.c msg_099.c msg_100.c msg_101.c msg_108.c msg_109.c msg_114.c msg_115.c msg_116.c msg_117.c msg_120.c msg_121.c msg_122.c msg_125.c msg_126.c msg_127.c msg_127.exp msg_130.c msg_133.c msg_136.c msg_142.c msg_143.c msg_144.c msg_145.c msg_146.c msg_146.exp msg_150.c msg_156.c msg_160.c msg_164.c msg_165.c msg_167.c msg_169.c msg_169.exp msg_170.c msg_172.c msg_173.c msg_174.c msg_180.c msg_204.c msg_219.c msg_221.c msg_230.c msg_232.c msg_265.c msg_308.c msg_324.c Log Message: lint: add expections to tests msg_098: fix suffix for floating point constant msg_127: remove prototype msg_146: fix return type To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_000.c \ src/tests/usr.bin/xlint/lint1/msg_001.c \ src/tests/usr.bin/xlint/lint1/msg_002.c \ src/tests/usr.bin/xlint/lint1/msg_003.c \ src/tests/usr.bin/xlint/lint1/msg_004.c \ src/tests/usr.bin/xlint/lint1/msg_005.c \ src/tests/usr.bin/xlint/lint1/msg_006.c \ src/tests/usr.bin/xlint/lint1/msg_007.c \ src/tests/usr.bin/xlint/lint1/msg_008.c \ src/tests/usr.bin/xlint/lint1/msg_009.c \ src/tests/usr.bin/xlint/lint1/msg_027.c \ src/tests/usr.bin/xlint/lint1/msg_029.c \ src/tests/usr.bin/xlint/lint1/msg_031.c \ src/tests/usr.bin/xlint/lint1/msg_034.c \ src/tests/usr.bin/xlint/lint1/msg_036.c \ src/tests/usr.bin/xlint/lint1/msg_037.c \ src/tests/usr.bin/xlint/lint1/msg_050.c \ src/tests/usr.bin/xlint/lint1/msg_051.c \ src/tests/usr.bin/xlint/lint1/msg_054.c \ src/tests/usr.bin/xlint/lint1/msg_055.c \ src/tests/usr.bin/xlint/lint1/msg_056.c \ src/tests/usr.bin/xlint/lint1/msg_057.c \ src/tests/usr.bin/xlint/lint1/msg_060.c \ src/tests/usr.bin/xlint/lint1/msg_061.c \ src/tests/usr.bin/xlint/lint1/msg_066.c \ src/tests/usr.bin/xlint/lint1/msg_068.c \ src/tests/usr.bin/xlint/lint1/msg_071.c \ src/tests/usr.bin/xlint/lint1/msg_072.c \ src/tests/usr.bin/xlint/lint1/msg_073.c \ src/tests/usr.bin/xlint/lint1/msg_074.c \ src/tests/usr.bin/xlint/lint1/msg_075.c \ src/tests/usr.bin/xlint/lint1/msg_081.c \ src/tests/usr.bin/xlint/lint1/msg_082.c \ src/tests/usr.bin/xlint/lint1/msg_083.c \ src/tests/usr.bin/xlint/lint1/msg_084.c \ src/tests/usr.bin/xlint/lint1/msg_086.c \ src/tests/usr.bin/xlint/lint1/msg_087.c \ src/tests/usr.bin/xlint/lint1/msg_088.c \ src/tests/usr.bin/xlint/lint1/msg_089.c \ src/tests/usr.bin/xlint/lint1/msg_093.c \ src/tests/usr.bin/xlint/lint1/msg_094.c \ src/tests/usr.bin/xlint/lint1/msg_095.c \ src/tests/usr.bin/xlint/lint1/msg_096.c \ src/tests/usr.bin/xlint/lint1/msg_097.c \ src/tests/usr.bin/xlint/lint1/msg_098.c \ src/tests/usr.bin/xlint/lint1/msg_099.c \ src/tests/usr.bin/xlint/lint1/msg_100.c \ src/tests/usr.bin/xlint/lint1/msg_101.c \ src/tests/usr.bin/xlint/lint1/msg_109.c \ src/tests/usr.bin/xlint/lint1/msg_114.c \ src/tests/usr.bin/xlint/lint1/msg_117.c \ src/tests/usr.bin/xlint/lint1/msg_120.c \ src/tests/usr.bin/xlint/lint1/msg_121.c \ src/tests/usr.bin/xlint/lint1/msg_122.c \ src/tests/usr.bin/xlint/lint1/msg_125.c \ src/tests/usr.bin/xlint/lint1/msg_126.c \ src/tests/usr.bin/xlint/lint1/msg_127.c \ src/tests/usr.bin/xlint/lint1/msg_127.exp \ src/tests/usr.bin/xlint/lint1/msg_130.c \ src/tests/usr.bin/xlint/lint1/msg_133.c \ src/tests/usr.bin/xlint/lint1/msg_136.c \ src/tests/usr.bin/xlint/lint1/msg_142.c \ src/tests/usr.bin/xlint/lint1/msg_143.c \ src/tests/usr.bin/xlint/lint1/msg_144.c \ src/tests/usr.bin/xlint/lint1/msg_145.c \ src/tests/usr.bin/xlint/lint1/msg_146.c \ src/tests/usr.bin/xlint/lint1/msg_146.exp \ src/tests/usr.bin/xlint/lint1/msg_150.c \ src/tests/usr.bin/xlint/lint1/msg_156.c \ src/tests/usr.bin/xlint/lint1/msg_160.c \ src/tests/usr.bin/xlint/lint1/msg_164.c \ src/tests/usr.bin/xlint/lint1/msg_165.c \ src/tests/usr.bin/xlint/lint1/msg_167.c \ src/tests/usr.bin/xlint/lint1/msg_170.c \ src/tests/usr.bin/xlint/lint1/msg_172.c \ src/tests/usr.bin/xlint/lint1/msg_173.c \ src/tests/usr.bin/xlint/lint1/msg_174.c \
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 09:48:47 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_019.c msg_019.exp msg_021.c msg_021.exp Log Message: lint: test messages 019 and 021 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_019.c \ src/tests/usr.bin/xlint/lint1/msg_019.exp \ src/tests/usr.bin/xlint/lint1/msg_021.c \ src/tests/usr.bin/xlint/lint1/msg_021.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/msg_019.c diff -u src/tests/usr.bin/xlint/lint1/msg_019.c:1.1 src/tests/usr.bin/xlint/lint1/msg_019.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_019.c:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_019.c Sun Jan 31 09:48:47 2021 @@ -1,7 +1,14 @@ -/* $NetBSD: msg_019.c,v 1.1 2021/01/02 10:22:43 rillig Exp $ */ +/* $NetBSD: msg_019.c,v 1.2 2021/01/31 09:48:47 rillig Exp $ */ # 3 "msg_019.c" // Test for message: void type for %s [19] -TODO: "Add example code that triggers the above message." -TODO: "Add example code that almost triggers the above message." +void global_variable; /* expect: 19 */ + +static void unit_variable; /* expect: 19, 226 */ + +void +function(void parameter) /* expect: 61, 231 */ +{ + void local_variable; /* expect: 19 */ +} Index: src/tests/usr.bin/xlint/lint1/msg_019.exp diff -u src/tests/usr.bin/xlint/lint1/msg_019.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_019.exp:1.2 --- src/tests/usr.bin/xlint/lint1/msg_019.exp:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_019.exp Sun Jan 31 09:48:47 2021 @@ -1 +1,6 @@ -msg_019.c(6): syntax error ':' [249] +msg_019.c(6): void type for global_variable [19] +msg_019.c(8): void type for unit_variable [19] +msg_019.c(11): void parameter cannot have name: parameter [61] +msg_019.c(13): void type for local_variable [19] +msg_019.c(11): warning: argument parameter unused in function function [231] +msg_019.c(8): warning: static variable unit_variable unused [226] Index: src/tests/usr.bin/xlint/lint1/msg_021.c diff -u src/tests/usr.bin/xlint/lint1/msg_021.c:1.1 src/tests/usr.bin/xlint/lint1/msg_021.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_021.c:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_021.c Sun Jan 31 09:48:47 2021 @@ -1,7 +1,37 @@ -/* $NetBSD: msg_021.c,v 1.1 2021/01/02 10:22:43 rillig Exp $ */ +/* $NetBSD: msg_021.c,v 1.2 2021/01/31 09:48:47 rillig Exp $ */ # 3 "msg_021.c" // Test for message: redeclaration of formal parameter %s [21] -TODO: "Add example code that triggers the above message." -TODO: "Add example code that almost triggers the above message." +/*ARGSUSED*/ +void +old_style_with_duplicate_parameter(parameter, parameter) /* expect: 21 */ +int parameter; +{/* expect: 32 */ +} + +void +old_style_with_duplicate_parameter_declaration(parameter) +int parameter; +int parameter; /* expect: 237 */ +{ +} + +void old_style_with_local_variable(parameter) +int parameter; +{ + int parameter; /* expect: 27 */ +} + +/*ARGSUSED*/ +void +prototype_with_duplicate_parameter(int param, int param) /* expect: 237 */ +{ + +} + +void +prototype_with_local_variable(int parameter) +{ + int parameter; /* expect: 27 */ +} Index: src/tests/usr.bin/xlint/lint1/msg_021.exp diff -u src/tests/usr.bin/xlint/lint1/msg_021.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_021.exp:1.2 --- src/tests/usr.bin/xlint/lint1/msg_021.exp:1.1 Sat Jan 2 10:22:43 2021 +++ src/tests/usr.bin/xlint/lint1/msg_021.exp Sun Jan 31 09:48:47 2021 @@ -1 +1,6 @@ -msg_021.c(6): syntax error ':' [249] +msg_021.c(8): redeclaration of formal parameter parameter [21] +msg_021.c(10): warning: argument type defaults to 'int': parameter [32] +msg_021.c(16): redeclaration of formal parameter parameter [237] +msg_021.c(23): redeclaration of parameter [27] +msg_021.c(28): redeclaration of formal parameter param [237] +msg_021.c(36): redeclaration of parameter [27]
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Jan 31 09:26:27 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_003.exp src/usr.bin/xlint/lint1: cgram.y err.c Log Message: lint: be more precise in message 003 "tag in argument list" To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_003.exp cvs rdiff -u -r1.157 -r1.158 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.72 -r1.73 src/usr.bin/xlint/lint1/err.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_003.exp diff -u src/tests/usr.bin/xlint/lint1/msg_003.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_003.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_003.exp:1.2 Sun Jan 31 09:21:24 2021 +++ src/tests/usr.bin/xlint/lint1/msg_003.exp Sun Jan 31 09:26:27 2021 @@ -1,3 +1,3 @@ -msg_003.c(9): warning: struct declared in argument declaration list [3] -msg_003.c(10): warning: union declared in argument declaration list [3] -msg_003.c(11): warning: enum declared in argument declaration list [3] +msg_003.c(9): warning: 'struct struct_in_argument' declared in argument declaration list [3] +msg_003.c(10): warning: 'union union_in_argument' declared in argument declaration list [3] +msg_003.c(11): warning: 'enum enum_in_argument' declared in argument declaration list [3] Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.157 src/usr.bin/xlint/lint1/cgram.y:1.158 --- src/usr.bin/xlint/lint1/cgram.y:1.157 Mon Jan 18 19:24:09 2021 +++ src/usr.bin/xlint/lint1/cgram.y Sun Jan 31 09:26:27 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.157 2021/01/18 19:24:09 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.158 2021/01/31 09:26:27 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.157 2021/01/18 19:24:09 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.158 2021/01/31 09:26:27 rillig Exp $"); #endif #include @@ -480,18 +480,14 @@ arg_declaration: /* empty declaration */ warning(2); } else { - tspec_t ts = dcs->d_type->t_tspec; - /* %s declared in argument declaration list */ - warning(3, ts == STRUCT ? "struct" : -(ts == UNION ? "union" : "enum")); + /* '%s' declared in argument declaration list */ + warning(3, type_name(dcs->d_type)); } } | declspecs deftyp type_init_decls T_SEMI { if (dcs->d_nedecl) { - tspec_t ts = dcs->d_type->t_tspec; - /* %s declared in argument declaration list */ - warning(3, ts == STRUCT ? "struct" : -(ts == UNION ? "union" : "enum")); + /* '%s' declared in argument declaration list */ + warning(3, type_name(dcs->d_type)); } } | declmods error Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.72 src/usr.bin/xlint/lint1/err.c:1.73 --- src/usr.bin/xlint/lint1/err.c:1.72 Sat Jan 30 21:58:04 2021 +++ src/usr.bin/xlint/lint1/err.c Sun Jan 31 09:26:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.72 2021/01/30 21:58:04 rillig Exp $ */ +/* $NetBSD: err.c,v 1.73 2021/01/31 09:26:27 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.72 2021/01/30 21:58:04 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.73 2021/01/31 09:26:27 rillig Exp $"); #endif #include @@ -62,7 +62,7 @@ const char *msgs[] = { "empty declaration", /* 0 */ "old style declaration; add int", /* 1 */ "empty declaration", /* 2 */ - "%s declared in argument declaration list", /* 3 */ + "'%s' declared in argument declaration list", /* 3 */ "illegal type combination", /* 4 */ "modifying typedef with '%s'; only qualifiers allowed", /* 5 */ "use 'double' instead of 'long float'", /* 6 */
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jan 31 09:21:24 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_003.c msg_003.exp msg_085.c msg_085.exp msg_243.c msg_243.exp Log Message: lint: add a few more tests To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_003.c \ src/tests/usr.bin/xlint/lint1/msg_003.exp \ src/tests/usr.bin/xlint/lint1/msg_243.c \ src/tests/usr.bin/xlint/lint1/msg_243.exp cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_085.c \ src/tests/usr.bin/xlint/lint1/msg_085.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/msg_003.c diff -u src/tests/usr.bin/xlint/lint1/msg_003.c:1.1 src/tests/usr.bin/xlint/lint1/msg_003.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_003.c:1.1 Sat Jan 2 10:22:42 2021 +++ src/tests/usr.bin/xlint/lint1/msg_003.c Sun Jan 31 09:21:24 2021 @@ -1,7 +1,13 @@ -/* $NetBSD: msg_003.c,v 1.1 2021/01/02 10:22:42 rillig Exp $ */ +/* $NetBSD: msg_003.c,v 1.2 2021/01/31 09:21:24 rillig Exp $ */ # 3 "msg_003.c" // Test for message: %s declared in argument declaration list [3] -TODO: "Add example code that triggers the above message." -TODO: "Add example code that almost triggers the above message." +/*ARGSUSED*/ +void +example(declare_struct, declare_union, declare_enum) +struct struct_in_argument *declare_struct; +union union_in_argument *declare_union; +enum enum_in_argument *declare_enum; +{ +} Index: src/tests/usr.bin/xlint/lint1/msg_003.exp diff -u src/tests/usr.bin/xlint/lint1/msg_003.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_003.exp:1.2 --- src/tests/usr.bin/xlint/lint1/msg_003.exp:1.1 Sat Jan 2 10:22:42 2021 +++ src/tests/usr.bin/xlint/lint1/msg_003.exp Sun Jan 31 09:21:24 2021 @@ -1 +1,3 @@ -msg_003.c(6): syntax error ':' [249] +msg_003.c(9): warning: struct declared in argument declaration list [3] +msg_003.c(10): warning: union declared in argument declaration list [3] +msg_003.c(11): warning: enum declared in argument declaration list [3] Index: src/tests/usr.bin/xlint/lint1/msg_243.c diff -u src/tests/usr.bin/xlint/lint1/msg_243.c:1.1 src/tests/usr.bin/xlint/lint1/msg_243.c:1.2 --- src/tests/usr.bin/xlint/lint1/msg_243.c:1.1 Sat Jan 2 10:22:44 2021 +++ src/tests/usr.bin/xlint/lint1/msg_243.c Sun Jan 31 09:21:24 2021 @@ -1,7 +1,25 @@ -/* $NetBSD: msg_243.c,v 1.1 2021/01/02 10:22:44 rillig Exp $ */ +/* $NetBSD: msg_243.c,v 1.2 2021/01/31 09:21:24 rillig Exp $ */ # 3 "msg_243.c" // Test for message: dubious comparison of enums, op %s [243] -TODO: "Add example code that triggers the above message." -TODO: "Add example code that almost triggers the above message." +/* lint1-extra-flags: -eP */ + +enum color { + RED, GREEN, BLUE +}; + +void eval(_Bool); + +/* TODO: There should be a way to declare an enum type as "ordered ok". */ + +void +example(enum color a, enum color b) +{ + eval(a < b); /* expect: 243 */ + eval(a <= b); /* expect: 243 */ + eval(a > b); /* expect: 243 */ + eval(a >= b); /* expect: 243 */ + eval(a == b); + eval(a != b); +} Index: src/tests/usr.bin/xlint/lint1/msg_243.exp diff -u src/tests/usr.bin/xlint/lint1/msg_243.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_243.exp:1.2 --- src/tests/usr.bin/xlint/lint1/msg_243.exp:1.1 Sat Jan 2 10:22:44 2021 +++ src/tests/usr.bin/xlint/lint1/msg_243.exp Sun Jan 31 09:21:24 2021 @@ -1 +1,4 @@ -msg_243.c(6): syntax error ':' [249] +msg_243.c(19): warning: dubious comparison of enums, op < [243] +msg_243.c(20): warning: dubious comparison of enums, op <= [243] +msg_243.c(21): warning: dubious comparison of enums, op > [243] +msg_243.c(22): warning: dubious comparison of enums, op >= [243] Index: src/tests/usr.bin/xlint/lint1/msg_085.c diff -u src/tests/usr.bin/xlint/lint1/msg_085.c:1.2 src/tests/usr.bin/xlint/lint1/msg_085.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_085.c:1.2 Sat Jan 2 18:06:01 2021 +++ src/tests/usr.bin/xlint/lint1/msg_085.c Sun Jan 31 09:21:24 2021 @@ -1,9 +1,11 @@ -/* $NetBSD: msg_085.c,v 1.2 2021/01/02 18:06:01 rillig Exp $ */ +/* $NetBSD: msg_085.c,v 1.3 2021/01/31 09:21:24 rillig Exp $ */ # 3 "msg_085.c" // Test for message: dubious tag declaration: %s %s [85] -extern int stat(struct stat *); +void declare_struct(struct in_argument *); /* expect: 85 */ +void declare_union(union in_argument *); /* expect: 85 */ +void declare_enum(enum in_argument *); /* expect: 85 */ -struct ok; +struct ok; /* expect: 233 */ extern int ok(struct ok *); Index: src/tests/usr.bin/xlint/lint1/msg_085.exp diff -u src/tests/usr.bin/xlint/lint1/msg_085.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_085.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_085.exp:1.2 Sat Jan 2 18:06:01 2021 +++ src/tests/usr.bin/xlint/lint1/msg_085.exp Sun Jan 31 09:21:24 2021 @@ -1,2 +1,4 @@ -msg_085.c(6): warning: dubious tag declaration: struct stat [85]
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: lukem Date: Sun Jan 31 08:59:40 UTC 2021 Modified Files: src/usr.bin/ftp: ftp.1 Log Message: ftp(1): more $https_proxy documentation Document $https_proxy in ENVIRONMENT. (It was already documented elsewhere). Fixes PR bin/51883 To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/usr.bin/ftp/ftp.1 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/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.143 src/usr.bin/ftp/ftp.1:1.144 --- src/usr.bin/ftp/ftp.1:1.143 Wed Jan 6 09:15:59 2021 +++ src/usr.bin/ftp/ftp.1 Sun Jan 31 08:59:40 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: ftp.1,v 1.143 2021/01/06 09:15:59 lukem Exp $ +.\" $NetBSD: ftp.1,v 1.144 2021/01/31 08:59:40 lukem Exp $ .\" .\" Copyright (c) 1996-2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd January 6, 2021 +.Dd January 31, 2021 .Dt FTP 1 .Os .Sh NAME @@ -2362,6 +2362,16 @@ may be incompatible with other programs .Em NOTE : this is not used for interactive sessions, only for command-line fetches. +.It Ev https_proxy +URL of +.Tn HTTPS +proxy to use when making +.Tn HTTPS +URL requests. +.Pp +See +.Ev http_proxy +for further notes about proxy use. .It Ev no_proxy A space or comma separated list of hosts (or domains) for which proxying is not to be used.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Sun Jan 31 08:47:07 UTC 2021 Modified Files: src/sys/arch/evbarm/conf: GENERIC Log Message: Sort the EARLYCONS entries. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/arch/evbarm/conf/GENERIC 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/evbarm/conf/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.92 src/sys/arch/evbarm/conf/GENERIC:1.93 --- src/sys/arch/evbarm/conf/GENERIC:1.92 Sun Jan 31 06:24:40 2021 +++ src/sys/arch/evbarm/conf/GENERIC Sun Jan 31 08:47:07 2021 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.92 2021/01/31 06:24:40 skrll Exp $ +# $NetBSD: GENERIC,v 1.93 2021/01/31 08:47:07 skrll Exp $ # # GENERIC ARM (aarch32) kernel # @@ -47,10 +47,13 @@ options MSGBUFSIZE=32768 # EARLYCONS is required for early init messages from VERBOSE_INIT_ARM. #options EARLYCONS=am33xx, CONSADDR=0x44e09000 -#options EARLYCONS=omap3, CONSADDR=0x4902 -# ODROID-C1 -#options EARLYCONS=meson, CONSADDR=0xc81004c0 +# RaspberryPIs +#options EARLYCONS=bcm2835, CONSADDR=0x20201000 +#options EARLYCONS=bcm2836, CONSADDR=0x3f201000 +#options EARLYCONS=bcm2837, CONSADDR=0x3f215040 + +#options EARLYCONS=cycv, CONSADDR=0xffc02000 # ODROID-U3 #options EARLYCONS=exynos, CONSADDR=0x1381 @@ -58,13 +61,12 @@ options MSGBUFSIZE=32768 # ODROID-XU lite #options EARLYCONS=exynos, CONSADDR=0x12c2 -# RaspberryPIs -#options EARLYCONS=bcm2835, CONSADDR=0x20201000 -#options EARLYCONS=bcm2836, CONSADDR=0x3f201000 -#options EARLYCONS=bcm2837, CONSADDR=0x3f215040 - -#options EARLYCONS=cycv, CONSADDR=0xffc02000 #options EARLYCONS=imx, CONSADDR=0x0202 + +# ODROID-C1 +#options EARLYCONS=meson, CONSADDR=0xc81004c0 + +#options EARLYCONS=omap3, CONSADDR=0x4902 #options EARLYCONS=rk3328, CONSADDR=0xff13 #options EARLYCONS=sunxi, CONSADDR=0x01c28000 @@ -73,7 +75,6 @@ options MSGBUFSIZE=32768 #options EARLYCONS=vexpress, CONSADDR=0x1c09 #options EARLYCONS=virt, CONSADDR=0x0900 - #options EARLYCONS=zynq, CONSADDR=0xe0001000 # Kernel Undefined Behavior Sanitizer (kUBSan). Use UBSAN_ALWAYS_FATAL
CVS commit: src/external/bsd/ntp/dist/ntpd
Module Name:src Committed By: roy Date: Sun Jan 31 08:27:49 UTC 2021 Modified Files: src/external/bsd/ntp/dist/ntpd: ntp_io.c Log Message: ntpd: ignore errno EINTR on reads from the routing socket To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/external/bsd/ntp/dist/ntpd/ntp_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.30 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.31 --- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.30 Sun Jan 31 08:26:47 2021 +++ src/external/bsd/ntp/dist/ntpd/ntp_io.c Sun Jan 31 08:27:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_io.c,v 1.30 2021/01/31 08:26:47 roy Exp $ */ +/* $NetBSD: ntp_io.c,v 1.31 2021/01/31 08:27:49 roy Exp $ */ /* * ntp_io.c - input/output routines for ntpd. The socket-opening code @@ -4741,7 +4741,7 @@ process_routing_msgs(struct asyncio_read cnt = read(reader->fd, buffer, sizeof(buffer)); } while (cnt != -1 || errno == ENOBUFS); timer_interfacetimeout(current_time + UPDATE_GRACE); - } else { + } else if (errno != EINTR) { msyslog(LOG_ERR, "routing socket reports: %m - disabling"); remove_asyncio_reader(reader);
CVS commit: src/external/bsd/ntp/dist/ntpd
Module Name:src Committed By: roy Date: Sun Jan 31 08:26:47 UTC 2021 Modified Files: src/external/bsd/ntp/dist/ntpd: ntp_io.c Log Message: ntpd: move route socket overflow message from LOG_ERR to LOG_DEBUG While here stop caring about RTM_LOSING as that's purely informational. If routing does change then we get RTM_ADD/DEL/CHANGE. Also stop caring about RTM_IFANNOUNCE as we really only want addresses and interface flag updates which we get by RTM_NEWADDR/DELADDR/CHGADDR and RTM_IFINFO. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/bsd/ntp/dist/ntpd/ntp_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.29 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.30 --- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.29 Sun Jan 3 15:33:05 2021 +++ src/external/bsd/ntp/dist/ntpd/ntp_io.c Sun Jan 31 08:26:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_io.c,v 1.29 2021/01/03 15:33:05 roy Exp $ */ +/* $NetBSD: ntp_io.c,v 1.30 2021/01/31 08:26:47 roy Exp $ */ /* * ntp_io.c - input/output routines for ntpd. The socket-opening code @@ -4730,8 +4730,9 @@ process_routing_msgs(struct asyncio_read if (cnt < 0) { if (errno == ENOBUFS) { - msyslog(LOG_ERR, -"routing socket reports: %m"); + msyslog(LOG_DEBUG, +"routing socket overflowed" +" - will update interfaces"); /* * drain the routing socket as we need to update * the interfaces anyway @@ -4792,15 +4793,9 @@ process_routing_msgs(struct asyncio_read #ifdef RTM_CHANGE case RTM_CHANGE: #endif -#ifdef RTM_LOSING - case RTM_LOSING: -#endif #ifdef RTM_IFINFO case RTM_IFINFO: #endif -#ifdef RTM_IFANNOUNCE - case RTM_IFANNOUNCE: -#endif #ifdef RTM_NEWLINK case RTM_NEWLINK: #endif @@ -4874,15 +4869,9 @@ init_async_notifications() #ifdef RTM_CHANGE RTM_CHANGE, #endif -#ifdef RTM_LOSING - RTM_LOSING, -#endif #ifdef RTM_IFINFO RTM_IFINFO, #endif -#ifdef RTM_IFANNOUNCE - RTM_IFANNOUNCE, -#endif #ifdef RTM_NEWLINK RTM_NEWLINK, #endif
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: skrll Date: Sun Jan 31 08:14:58 UTC 2021 Modified Files: src/sys/arch/aarch64/include: pmap.h Log Message: Improve a comment To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/include/pmap.h 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/aarch64/include/pmap.h diff -u src/sys/arch/aarch64/include/pmap.h:1.44 src/sys/arch/aarch64/include/pmap.h:1.45 --- src/sys/arch/aarch64/include/pmap.h:1.44 Sun Jan 31 04:51:29 2021 +++ src/sys/arch/aarch64/include/pmap.h Sun Jan 31 08:14:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.44 2021/01/31 04:51:29 ryo Exp $ */ +/* $NetBSD: pmap.h,v 1.45 2021/01/31 08:14:58 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -255,7 +255,7 @@ aarch64_mmap_flags(paddr_t mdpgno) u_int nflag, pflag; /* - * aarch64 arch has 5 memory attribute: + * aarch64 arch has 5 memory attributes defined: * * WriteBack - write back cache * WriteThru - write through cache
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: martin Date: Sun Jan 31 08:07:25 UTC 2021 Modified Files: src/sys/arch/sparc64/conf: GENERIC Log Message: Allow local builds to add configuration changes via GENERIC.local To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/arch/sparc64/conf/GENERIC 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/conf/GENERIC diff -u src/sys/arch/sparc64/conf/GENERIC:1.233 src/sys/arch/sparc64/conf/GENERIC:1.234 --- src/sys/arch/sparc64/conf/GENERIC:1.233 Fri Oct 30 06:44:37 2020 +++ src/sys/arch/sparc64/conf/GENERIC Sun Jan 31 08:07:25 2021 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.233 2020/10/30 06:44:37 jdc Exp $ +# $NetBSD: GENERIC,v 1.234 2021/01/31 08:07:25 martin Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/sparc64/conf/std.sparc64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.233 $" +#ident "GENERIC-$Revision: 1.234 $" maxusers 64 @@ -419,6 +419,9 @@ fdc0 at sbus? slot ? offset ? # SUNW,fd #fdc0 at ebus?# fdthree, EXPERIMENTAL fd* at fdc0 # the drive itself +# Pull in optional local configuration +cinclude "arch/sparc64/conf/GENERIC.local" + # # accept filters pseudo-device accf_data # "dataready" accept filter