CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Mon Apr 12 08:31:30 UTC 2021 Modified Files: src/external/gpl3/gcc: README.gcc10 Log Message: updates: - arm64 doesn't build (missing __aarch64_swp1_acq in kernels) - mips cpu targets all build (maybe not all ports) - powerpc builds (maybe not all ports) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/README.gcc10 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/README.gcc10 diff -u src/external/gpl3/gcc/README.gcc10:1.1 src/external/gpl3/gcc/README.gcc10:1.2 --- src/external/gpl3/gcc/README.gcc10:1.1 Mon Apr 12 00:05:54 2021 +++ src/external/gpl3/gcc/README.gcc10 Mon Apr 12 08:31:30 2021 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc10,v 1.1 2021/04/12 00:05:54 mrg Exp $ +$NetBSD: README.gcc10,v 1.2 2021/04/12 08:31:30 mrg Exp $ new stuff: @@ -32,7 +32,7 @@ switched: has port switched? y (yes), n architecture tools kernels libgcc native-gcc make release runs atf switched - --- -- -- --- -aarch64 y n n y n ? ? ? +aarch64 y n[3] y y n ? ? ? aarch64be y n n y n ? ? ? alpha y n n y n ? ? ? earmv4 y n n y n ? ? ? @@ -54,12 +54,12 @@ i386 y n n y n ? ? ? ia64 y n n y n ? N/A ? m68000 y n n y n ? ? ? m68k y n n y n ? ? ? -mipseb y n n y n ? ? ? -mipsel y n n y n ? ? ? -mips64eb y n n y n ? ? ? -mips64el y n n y n ? ? ? -powerpc n[1] n n n n ? ? ? -powerpc64 n[1] n n n n N/A N/A ? +mipseb y n y y y ? ? ? +mipsel y n y y y ? ? ? +mips64eb y n y y y ? ? ? +mips64el y n y y y ? ? ? +powerpc y n y y y ? ? ? +powerpc64 y n y y y N/A N/A ? sh3eb y n n y n ? ? ? sh3el y n n y n ? ? ? sparc y y y y y y ? ? @@ -73,7 +73,7 @@ coldfire ? N/A ? ? ? N/A N/A - --- -- -- --- architecture tools kernels libgcc native-gcc make release runs atf -[1] - rs6000.c is not yet merged, build issues. +[3] - missing __aarch64_swp1_acq in kernels. @@ -96,14 +96,14 @@ earmv7hf: n n m68k: n n n n n n n n n n n evbmips emips ews4800mips mipsco newsmips sgimips -mipseb: n n n n n n +mipseb: y n n n n n evbmips algor arc cobalt hpcmips pmax -mipsel: n n n n n n +mipsel: y n n n n n algor evbmips pmax -mips64eb: n -mips64el: n n n +mips64eb: y +mips64el: n y n amigappc bebox evbppc ibmnws macppc mvmeppc ofppc prep rs6000 sandpoint powerpc: n n n n n n n n n n
CVS commit: src/external/bsd/bc/dist
Module Name:src Committed By: mrg Date: Mon Apr 12 08:54:11 UTC 2021 Modified Files: src/external/bsd/bc/dist: global.h Log Message: avoid common symbols. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/bc/dist/global.h 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/bc/dist/global.h diff -u src/external/bsd/bc/dist/global.h:1.1 src/external/bsd/bc/dist/global.h:1.2 --- src/external/bsd/bc/dist/global.h:1.1 Mon Apr 10 02:28:23 2017 +++ src/external/bsd/bc/dist/global.h Mon Apr 12 08:54:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: global.h,v 1.1 2017/04/10 02:28:23 phil Exp $ */ +/* $NetBSD: global.h,v 1.2 2021/04/12 08:54:11 mrg Exp $ */ /* * Copyright (C) 1991-1994, 1997, 2006, 2008, 2012-2017 Free Software Foundation, Inc. @@ -118,9 +118,9 @@ EXTERN int n_history; #if defined(LIBEDIT) /* LIBEDIT data */ -EditLine *edit INIT(NULL); -History *hist; -HistEvent histev; +EXTERN EditLine *edit INIT(NULL); +EXTERN History *hist; +EXTERN HistEvent histev; #endif /* "Condition code" -- false (0) or true (1) */
CVS commit: src/external/bsd/ekermit/dist
Module Name:src Committed By: mrg Date: Mon Apr 12 08:55:22 UTC 2021 Modified Files: src/external/bsd/ekermit/dist: kermit.c Log Message: properly size a buffer to include the trailing nul. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ekermit/dist/kermit.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/ekermit/dist/kermit.c diff -u src/external/bsd/ekermit/dist/kermit.c:1.1.1.1 src/external/bsd/ekermit/dist/kermit.c:1.2 --- src/external/bsd/ekermit/dist/kermit.c:1.1.1.1 Fri Aug 8 19:20:39 2014 +++ src/external/bsd/ekermit/dist/kermit.c Mon Apr 12 08:55:22 2021 @@ -1291,7 +1291,7 @@ gattr(struct k_data * k, UCHAR * s, stru UCHAR c;/* Workers */ int aln, i, rc; -UCHAR sizebuf[SIZEBUFL]; +UCHAR sizebuf[SIZEBUFL+1]; rc = -1; while ((c = *s++)) { /* Get attribute tag */
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: mrg Date: Mon Apr 12 09:03:39 UTC 2021 Modified Files: src/external/gpl3/gcc/dist/gcc: config.gcc Log Message: arm/netbsd-elf.h is necessary for eabi targets. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/external/gpl3/gcc/dist/gcc/config.gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.67 src/external/gpl3/gcc/dist/gcc/config.gcc:1.68 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.67 Sun Apr 11 01:37:18 2021 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Mon Apr 12 09:03:39 2021 @@ -1280,7 +1280,7 @@ arm*-*-netbsdelf*) esac case ${target} in arm*-*-netbsdelf-*eabi*) - tm_file="${tm_file} arm/bpabi.h arm/netbsd-eabi.h" + tm_file="${tm_file} arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h" # GCC 7 vs NetBSD/eabi -> avoid arm unwinder #tmake_file="$tmake_file arm/t-bpabi" tmake_file="$tmake_file arm/t-netbsdeabi" @@ -1288,7 +1288,7 @@ arm*-*-netbsdelf*) default_use_cxa_atexit=yes ;; *) - tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h" + tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h" #tmake_file="$tmake_file arm/t-bpabi arm/t-netbsdeabi" tmake_file="$tmake_file arm/t-netbsd" ;;
CVS commit: src/games/adventure
Module Name:src Committed By: mrg Date: Mon Apr 12 09:12:28 UTC 2021 Modified Files: src/games/adventure: save.c Log Message: avoid leaving off the trailing nul in a literal string. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/games/adventure/save.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/adventure/save.c diff -u src/games/adventure/save.c:1.14 src/games/adventure/save.c:1.15 --- src/games/adventure/save.c:1.14 Sat Mar 22 22:04:40 2014 +++ src/games/adventure/save.c Mon Apr 12 09:12:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: save.c,v 1.14 2014/03/22 22:04:40 dholland Exp $ */ +/* $NetBSD: save.c,v 1.15 2021/04/12 09:12:28 mrg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: save.c,v 1.14 2014/03/22 22:04:40 dholland Exp $"); +__RCSID("$NetBSD: save.c,v 1.15 2021/04/12 09:12:28 mrg Exp $"); #endif #endif/* not lint */ @@ -77,7 +77,7 @@ static const char header[] = "Adventure * Map 16 plain values into 90 coded values and back. */ -static const char coding[90] = +static const char coding[91] = "Db.GOyT]7a6zpF(c*5H9oK~0[WVAg&kR)ml,2^q-1Y3v+" "X/=JirZL$C>_N?:}B{dfnsxU<@MQ%8|P!4h`ESt;euwIj" ;
CVS commit: src/lib/libm/src
Module Name:src Committed By: mrg Date: Mon Apr 12 09:15:52 UTC 2021 Modified Files: src/lib/libm/src: k_standard.c Log Message: add a default: case to __kernel_standard(), failing with EDOM To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libm/src/k_standard.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/libm/src/k_standard.c diff -u src/lib/libm/src/k_standard.c:1.22 src/lib/libm/src/k_standard.c:1.23 --- src/lib/libm/src/k_standard.c:1.22 Sat Aug 27 10:03:16 2016 +++ src/lib/libm/src/k_standard.c Mon Apr 12 09:15:52 2021 @@ -12,7 +12,7 @@ #include #if defined(LIBM_SCCS) && !defined(lint) -__RCSID("$NetBSD: k_standard.c,v 1.22 2016/08/27 10:03:16 christos Exp $"); +__RCSID("$NetBSD: k_standard.c,v 1.23 2021/04/12 09:15:52 mrg Exp $"); #endif #include "math.h" @@ -825,6 +825,13 @@ __kernel_standard(double x, double y, in errno = EDOM; } break; + default: + if (_LIB_VERSION == _SVID_) + exc.retval = -HUGE; + else + exc.retval = -HUGE_VAL; + errno = EDOM; + break; } return exc.retval; }
CVS commit: src/lib/libskey
Module Name:src Committed By: mrg Date: Mon Apr 12 09:17:10 UTC 2021 Modified Files: src/lib/libskey: put.c Log Message: avoid an unlikely buffer truncation. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libskey/put.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/libskey/put.c diff -u src/lib/libskey/put.c:1.14 src/lib/libskey/put.c:1.15 --- src/lib/libskey/put.c:1.14 Thu Oct 3 17:08:26 2019 +++ src/lib/libskey/put.c Mon Apr 12 09:17:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: put.c,v 1.14 2019/10/03 17:08:26 christos Exp $ */ +/* $NetBSD: put.c,v 1.15 2021/04/12 09:17:10 mrg Exp $ */ /* S/KEY v1.1b (put.c) * @@ -12,7 +12,7 @@ */ #include -__RCSID("$NetBSD: put.c,v 1.14 2019/10/03 17:08:26 christos Exp $"); +__RCSID("$NetBSD: put.c,v 1.15 2021/04/12 09:17:10 mrg Exp $"); #include #include @@ -2122,7 +2122,7 @@ int etob(char *out, const char *e) { char *word; int i, p, v, l, low, high; - char b[9]; + char b[11]; char input[36]; char *last;
CVS commit: src/lib/libtelnet
Module Name:src Committed By: mrg Date: Mon Apr 12 09:17:48 UTC 2021 Modified Files: src/lib/libtelnet: kerberos5.c Log Message: pass the right enum to krb5_auth_con_setkeytype(). To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libtelnet/kerberos5.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/libtelnet/kerberos5.c diff -u src/lib/libtelnet/kerberos5.c:1.20 src/lib/libtelnet/kerberos5.c:1.21 --- src/lib/libtelnet/kerberos5.c:1.20 Sat Apr 26 22:10:40 2014 +++ src/lib/libtelnet/kerberos5.c Mon Apr 12 09:17:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kerberos5.c,v 1.20 2014/04/26 22:10:40 joerg Exp $ */ +/* $NetBSD: kerberos5.c,v 1.21 2021/04/12 09:17:48 mrg Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -228,7 +228,7 @@ kerberos5_send(Authenticator *ap) return (0); } krb5_auth_con_setkeytype(telnet_context, auth_context, - ETYPE_DES_CBC_CRC); + KRB5_ENCTYPE_DES_CBC_CRC); foo[0] = ap->type; foo[1] = ap->way;
CVS commit: src/sbin/mount_portal
Module Name:src Committed By: mrg Date: Mon Apr 12 09:18:14 UTC 2021 Modified Files: src/sbin/mount_portal: pt_filter.c Log Message: properly terminate a buffer after strncpy(). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sbin/mount_portal/pt_filter.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/mount_portal/pt_filter.c diff -u src/sbin/mount_portal/pt_filter.c:1.12 src/sbin/mount_portal/pt_filter.c:1.13 --- src/sbin/mount_portal/pt_filter.c:1.12 Thu May 14 08:34:17 2020 +++ src/sbin/mount_portal/pt_filter.c Mon Apr 12 09:18:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pt_filter.c,v 1.12 2020/05/14 08:34:17 msaitoh Exp $ */ +/* $NetBSD: pt_filter.c,v 1.13 2021/04/12 09:18:14 mrg Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: pt_filter.c,v 1.12 2020/05/14 08:34:17 msaitoh Exp $"); +__RCSID("$NetBSD: pt_filter.c,v 1.13 2021/04/12 09:18:14 mrg Exp $"); #endif/* not lint */ #include @@ -65,7 +65,8 @@ fill_cmd(char **cmdv, char *path, char * if (tempbuff == NULL) err(1, NULL); - strncpy(tempbuff, cmdv[0], n); + strncpy(tempbuff, cmdv[0], n - 1); + tempbuff[n - 1] = '\0'; for (i = 1; cmdv[i]; i++) { strncat(tempbuff, " ", n - strlen(tempbuff)); strncat(tempbuff, cmdv[i], n - strlen(tempbuff));
CVS commit: src/sys/arch/alpha/stand/common
Module Name:src Committed By: mrg Date: Mon Apr 12 09:18:45 UTC 2021 Modified Files: src/sys/arch/alpha/stand/common: OSFpal.c Log Message: avoid common symbols. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/stand/common/OSFpal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/stand/common/OSFpal.c diff -u src/sys/arch/alpha/stand/common/OSFpal.c:1.9 src/sys/arch/alpha/stand/common/OSFpal.c:1.10 --- src/sys/arch/alpha/stand/common/OSFpal.c:1.9 Wed Mar 18 10:22:22 2009 +++ src/sys/arch/alpha/stand/common/OSFpal.c Mon Apr 12 09:18:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: OSFpal.c,v 1.9 2009/03/18 10:22:22 cegger Exp $ */ +/* $NetBSD: OSFpal.c,v 1.10 2021/04/12 09:18:45 mrg Exp $ */ /* * Copyright (c) 1994, 1996 Carnegie-Mellon University. @@ -34,7 +34,8 @@ #include #include -paddr_t ptbr_save; +/* XXX */ +extern paddr_t ptbr_save; #include "common.h"
CVS commit: src/sys/arch/sun68k/stand/libsa
Module Name:src Committed By: mrg Date: Mon Apr 12 09:19:10 UTC 2021 Modified Files: src/sys/arch/sun68k/stand/libsa: netif_sun.c Log Message: use libsa/saerrno.h instead of our own errno definitions. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sun68k/stand/libsa/netif_sun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sun68k/stand/libsa/netif_sun.c diff -u src/sys/arch/sun68k/stand/libsa/netif_sun.c:1.10 src/sys/arch/sun68k/stand/libsa/netif_sun.c:1.11 --- src/sys/arch/sun68k/stand/libsa/netif_sun.c:1.10 Thu Nov 7 00:42:42 2013 +++ src/sys/arch/sun68k/stand/libsa/netif_sun.c Mon Apr 12 09:19:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netif_sun.c,v 1.10 2013/11/07 00:42:42 christos Exp $ */ +/* $NetBSD: netif_sun.c,v 1.11 2021/04/12 09:19:10 mrg Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -52,6 +52,8 @@ #include +#include + #include "libsa.h" #include "dvma.h" #include "saio.h" @@ -59,8 +61,6 @@ #define PKT_BUF_SIZE 2048 -int errno; - struct iodesc sockets[SOPEN_MAX]; struct netif prom_netif;
CVS commit: src/sys/dev/ieee1394
Module Name:src Committed By: mrg Date: Mon Apr 12 09:22:21 UTC 2021 Modified Files: src/sys/dev/ieee1394: firewire.h Log Message: convert union member from [0] array to [3] array, so that attempts to access these members later will work. does not affect size of the structure or layout in any other way. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ieee1394/firewire.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/ieee1394/firewire.h diff -u src/sys/dev/ieee1394/firewire.h:1.6 src/sys/dev/ieee1394/firewire.h:1.7 --- src/sys/dev/ieee1394/firewire.h:1.6 Sun Nov 14 15:47:20 2010 +++ src/sys/dev/ieee1394/firewire.h Mon Apr 12 09:22:21 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: firewire.h,v 1.6 2010/11/14 15:47:20 uebayasi Exp $ */ +/* $NetBSD: firewire.h,v 1.7 2021/04/12 09:22:21 mrg Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -142,7 +142,7 @@ struct fw_asyhdr { struct fw_pkt { union { - uint32_t ld[0]; + uint32_t ld[3]; struct { COMMON_HDR(, , tcode, ); } common;
CVS commit: src/sys/dev/nvmm
Module Name:src Committed By: mrg Date: Mon Apr 12 09:22:58 UTC 2021 Modified Files: src/sys/dev/nvmm: nvmm.c Log Message: be sure to only access vcpu if it was initialised. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/nvmm/nvmm.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/nvmm/nvmm.c diff -u src/sys/dev/nvmm/nvmm.c:1.42 src/sys/dev/nvmm/nvmm.c:1.43 --- src/sys/dev/nvmm/nvmm.c:1.42 Fri Mar 26 15:59:53 2021 +++ src/sys/dev/nvmm/nvmm.c Mon Apr 12 09:22:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm.c,v 1.42 2021/03/26 15:59:53 reinoud Exp $ */ +/* $NetBSD: nvmm.c,v 1.43 2021/04/12 09:22:58 mrg Exp $ */ /* * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.42 2021/03/26 15:59:53 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.43 2021/04/12 09:22:58 mrg Exp $"); #include #include @@ -603,7 +603,7 @@ static int nvmm_vcpu_run(struct nvmm_owner *owner, struct nvmm_ioc_vcpu_run *args) { struct nvmm_machine *mach; - struct nvmm_cpu *vcpu; + struct nvmm_cpu *vcpu = NULL; int error; error = nvmm_machine_get(owner, args->machid, &mach, false); @@ -619,7 +619,8 @@ nvmm_vcpu_run(struct nvmm_owner *owner, out: nvmm_machine_put(mach); - vcpu->comm->stop = 0; + if (vcpu) + vcpu->comm->stop = 0; return error; }
CVS commit: src/sys/dev/sbus
Module Name:src Committed By: mrg Date: Mon Apr 12 09:23:33 UTC 2021 Modified Files: src/sys/dev/sbus: magma.c Log Message: handle cd1400_compute_baud() failure and avoid reading uninitialised variables. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/dev/sbus/magma.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/sbus/magma.c diff -u src/sys/dev/sbus/magma.c:1.61 src/sys/dev/sbus/magma.c:1.62 --- src/sys/dev/sbus/magma.c:1.61 Sun Nov 10 21:16:37 2019 +++ src/sys/dev/sbus/magma.c Mon Apr 12 09:23:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: magma.c,v 1.61 2019/11/10 21:16:37 chs Exp $ */ +/* $NetBSD: magma.c,v 1.62 2021/04/12 09:23:32 mrg Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.61 2019/11/10 21:16:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.62 2021/04/12 09:23:32 mrg Exp $"); #if 0 #define MAGMA_DEBUG @@ -1743,7 +1743,10 @@ mbpp_recv(struct mbpp_port *mp, void *pt cd1400_write_reg(cd, CD1400_CAR, 0); /* input strobe at 100kbaud (10microseconds) */ - cd1400_compute_baud(10, cd->cd_clock, &rcor, &rbpr); + if (cd1400_compute_baud(10, cd->cd_clock, &rcor, &rbpr)) { + splx(s); + return 0; + } cd1400_write_reg(cd, CD1400_RCOR, rcor); cd1400_write_reg(cd, CD1400_RBPR, rbpr);
CVS commit: src/sys/external/bsd/gnu-efi/dist/lib
Module Name:src Committed By: mrg Date: Mon Apr 12 09:24:25 UTC 2021 Modified Files: src/sys/external/bsd/gnu-efi/dist/lib: misc.c Log Message: avoid uninitialised variable access. make this case like the other 2 around it. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/sys/external/bsd/gnu-efi/dist/lib/misc.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/external/bsd/gnu-efi/dist/lib/misc.c diff -u src/sys/external/bsd/gnu-efi/dist/lib/misc.c:1.1.1.2 src/sys/external/bsd/gnu-efi/dist/lib/misc.c:1.2 --- src/sys/external/bsd/gnu-efi/dist/lib/misc.c:1.1.1.2 Thu Aug 16 18:17:47 2018 +++ src/sys/external/bsd/gnu-efi/dist/lib/misc.c Mon Apr 12 09:24:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.1.1.2 2018/08/16 18:17:47 jmcneill Exp $ */ +/* $NetBSD: misc.c,v 1.2 2021/04/12 09:24:24 mrg Exp $ */ /*++ @@ -256,6 +256,7 @@ LibGetVariableAndSize ( // Initialize for GrowBuffer loop // +Status = EFI_SUCCESS; Buffer = NULL; BufferSize = 100;
CVS commit: src/usr.sbin/ac
Module Name:src Committed By: mrg Date: Mon Apr 12 09:29:53 UTC 2021 Modified Files: src/usr.sbin/ac: ac.c Log Message: use strlcpy() to ensure desired nul termination. trailing nul bytes are not needed here. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/ac/ac.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/ac/ac.c diff -u src/usr.sbin/ac/ac.c:1.25 src/usr.sbin/ac/ac.c:1.26 --- src/usr.sbin/ac/ac.c:1.25 Fri Aug 31 19:55:23 2012 +++ src/usr.sbin/ac/ac.c Mon Apr 12 09:29:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $ */ +/* $NetBSD: ac.c,v 1.26 2021/04/12 09:29:53 mrg Exp $ */ /*- * Copyright (c) 1994 Christopher G. Demetriou @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $"); +__RCSID("$NetBSD: ac.c,v 1.26 2021/04/12 09:29:53 mrg Exp $"); #endif #include @@ -214,7 +214,7 @@ find_login_ttys(void) Con = nCon; Maxcon += 10; } - (void)strncpy(Con[Ncon++], tty->ty_name, UT_LINESIZE); + strlcpy(Con[Ncon++], tty->ty_name, UT_LINESIZE); } endttyent(); qsort(Con, Ncon, sizeof(Con[0]), compare);
CVS commit: src/usr.sbin/moused
Module Name:src Committed By: mrg Date: Mon Apr 12 09:30:32 UTC 2021 Modified Files: src/usr.sbin/moused: moused.c Log Message: avoid attempting to print NULL. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/moused/moused.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/moused/moused.c diff -u src/usr.sbin/moused/moused.c:1.25 src/usr.sbin/moused/moused.c:1.26 --- src/usr.sbin/moused/moused.c:1.25 Sat Oct 18 08:33:31 2014 +++ src/usr.sbin/moused/moused.c Mon Apr 12 09:30:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: moused.c,v 1.25 2014/10/18 08:33:31 snj Exp $ */ +/* $NetBSD: moused.c,v 1.26 2021/04/12 09:30:32 mrg Exp $ */ /** ** Copyright (c) 1995 Michael Smith, All rights reserved. ** @@ -48,7 +48,7 @@ #include #ifndef lint -__RCSID("$NetBSD: moused.c,v 1.25 2014/10/18 08:33:31 snj Exp $"); +__RCSID("$NetBSD: moused.c,v 1.26 2021/04/12 09:30:32 mrg Exp $"); #endif /* not lint */ #include @@ -2540,11 +2540,11 @@ pnpparse(pnpid_t *id, char *buf, int len int i, j; id->revision = 0; -id->eisaid = NULL; +id->eisaid = ""; id->serial = NULL; id->class = NULL; -id->compat = NULL; -id->description = NULL; +id->compat = ""; +id->description = ""; id->neisaid = 0; id->nserial = 0; id->nclass = 0;
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Mon Apr 12 11:35:22 UTC 2021 Modified Files: src/sys/arch/mips/mips: db_disasm.c Log Message: Print target addresses similar to aarch64 as "address " instead of " [addr:address]". Uses less columns, a bit easier on the eyes. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/mips/mips/db_disasm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/db_disasm.c diff -u src/sys/arch/mips/mips/db_disasm.c:1.41 src/sys/arch/mips/mips/db_disasm.c:1.42 --- src/sys/arch/mips/mips/db_disasm.c:1.41 Wed Apr 7 14:27:39 2021 +++ src/sys/arch/mips/mips/db_disasm.c Mon Apr 12 11:35:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.41 2021/04/07 14:27:39 simonb Exp $ */ +/* $NetBSD: db_disasm.c,v 1.42 2021/04/12 11:35:22 simonb Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.41 2021/04/07 14:27:39 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.42 2021/04/12 11:35:22 simonb Exp $"); #include #include @@ -910,13 +910,11 @@ print_addr(db_addr_t loc) sym = db_search_symbol(loc, DB_STGY_ANY, &diff); db_symbol_values(sym, &symname, 0); + db_printf("%#"PRIxVADDR, loc); if (symname) { - if (diff == 0) - db_printf("%s", symname); - else - db_printf("<%s+%#"DDB_EXPR_FMT"x>", symname, diff); - db_printf("\t[addr:%#"PRIxVADDR"]", loc); - } else { - db_printf("%#"PRIxVADDR, loc); + db_printf(" <%s", symname); + if (diff != 0) + db_printf("+%#"DDB_EXPR_FMT"x", diff); + db_printf(">"); } }
CVS commit: src/usr.sbin/hdaudioctl
Module Name:src Committed By: nia Date: Mon Apr 12 12:22:10 UTC 2021 Modified Files: src/usr.sbin/hdaudioctl: hdaudioctl.8 Log Message: hdaudioctl.8: add missing arguments pointed out by RVP To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/hdaudioctl/hdaudioctl.8 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/hdaudioctl/hdaudioctl.8 diff -u src/usr.sbin/hdaudioctl/hdaudioctl.8:1.7 src/usr.sbin/hdaudioctl/hdaudioctl.8:1.8 --- src/usr.sbin/hdaudioctl/hdaudioctl.8:1.7 Mon Jun 15 13:06:39 2020 +++ src/usr.sbin/hdaudioctl/hdaudioctl.8 Mon Apr 12 12:22:10 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: hdaudioctl.8,v 1.7 2020/06/15 13:06:39 sborrill Exp $ +.\" $NetBSD: hdaudioctl.8,v 1.8 2021/04/12 12:22:10 nia Exp $ .\" .\" Copyright (c) 2009 Precedence Technologies Ltd .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 12, 2020 +.Dd April 12, 2021 .Dt HDAUDIOCTL 8 .Os .Sh NAME @@ -55,7 +55,7 @@ Valid commands are: For each child codec of the chosen .Xr hdaudio 4 device, display the nid, vendor, product, subsystem and device IDs. -.It show +.It show Ar codecid Ar nid Retrieve and display the current codec configuration in human-readable form. .It get Ar codecid Ar nid Retrieve and display the current codec configuration as a
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Apr 12 13:28:35 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: in the ':Q' modifier, only allocate memory if necessary To generate a diff of this commit: cvs rdiff -u -r1.923 -r1.924 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.923 src/usr.bin/make/var.c:1.924 --- src/usr.bin/make/var.c:1.923 Sun Apr 11 22:53:45 2021 +++ src/usr.bin/make/var.c Mon Apr 12 13:28:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.923 2021/04/11 22:53:45 rillig Exp $ */ +/* $NetBSD: var.c,v 1.924 2021/04/12 13:28:35 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.923 2021/04/11 22:53:45 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.924 2021/04/12 13:28:35 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -1908,28 +1908,26 @@ VarUniq(const char *str) * Quote shell meta-characters and space characters in the string. * If quoteDollar is set, also quote and double any '$' characters. */ -static char * -VarQuote(const char *str, bool quoteDollar) +static void +VarQuote(const char *str, bool quoteDollar, LazyBuf *buf) { - Buffer buf; - Buf_Init(&buf); + const char *p; - for (; *str != '\0'; str++) { - if (*str == '\n') { + LazyBuf_Init(buf, str); + for (p = str; *p != '\0'; p++) { + if (*p == '\n') { const char *newline = Shell_GetNewline(); if (newline == NULL) newline = "\\\n"; - Buf_AddStr(&buf, newline); + LazyBuf_AddStr(buf, newline); continue; } - if (ch_isspace(*str) || is_shell_metachar((unsigned char)*str)) - Buf_AddByte(&buf, '\\'); - Buf_AddByte(&buf, *str); - if (quoteDollar && *str == '$') - Buf_AddStr(&buf, "\\$"); + if (ch_isspace(*p) || is_shell_metachar((unsigned char)*p)) + LazyBuf_Add(buf, '\\'); + LazyBuf_Add(buf, *p); + if (quoteDollar && *p == '$') + LazyBuf_AddStr(buf, "\\$"); } - - return Buf_DoneData(&buf); } /* @@ -3068,14 +3066,22 @@ ApplyModifier_Regex(const char **pp, Mod static ApplyModifierResult ApplyModifier_Quote(const char **pp, ModChain *ch) { - bool quoteDollar = **pp == 'q'; + LazyBuf buf; + bool quoteDollar; + + quoteDollar = **pp == 'q'; if (!IsDelimiter((*pp)[1], ch)) return AMR_UNKNOWN; (*pp)++; - if (ModChain_ShouldEval(ch)) - Expr_SetValueOwn(ch->expr, - VarQuote(ch->expr->value.str, quoteDollar)); + if (!ModChain_ShouldEval(ch)) + return AMR_OK; + + VarQuote(ch->expr->value.str, quoteDollar, &buf); + if (buf.data != NULL) + Expr_SetValue(ch->expr, LazyBuf_DoneGet(&buf)); + else + LazyBuf_Done(&buf); return AMR_OK; }
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Mon Apr 12 15:54:55 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_220.c Log Message: Add an example of attribute fallthrough To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_220.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_220.c diff -u src/tests/usr.bin/xlint/lint1/msg_220.c:1.2 src/tests/usr.bin/xlint/lint1/msg_220.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_220.c:1.2 Sat Jan 30 12:02:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_220.c Mon Apr 12 11:54:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_220.c,v 1.2 2021/01/30 17:02:58 rillig Exp $ */ +/* $NetBSD: msg_220.c,v 1.3 2021/04/12 15:54:55 christos Exp $ */ # 3 "msg_220.c" // Test for message: fallthrough on case statement [220] @@ -23,3 +23,21 @@ example(int n) println("number"); } } + +void +example1(int n) +{ + switch (n) { + case 1: + case 3: + case 5: + println("odd"); + __attribute__((__fallthrough__)); + case 2: + case 7: + println("prime"); + __attribute__((__fallthrough__)); + default: + println("number"); + } +}
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Mon Apr 12 15:55:26 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y lex.c Log Message: Add attribute fallthrough To generate a diff of this commit: cvs rdiff -u -r1.211 -r1.212 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.26 -r1.27 src/usr.bin/xlint/lint1/lex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.211 src/usr.bin/xlint/lint1/cgram.y:1.212 --- src/usr.bin/xlint/lint1/cgram.y:1.211 Fri Apr 2 08:16:50 2021 +++ src/usr.bin/xlint/lint1/cgram.y Mon Apr 12 11:55:26 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.211 2021/04/02 12:16:50 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.212 2021/04/12 15:55:26 christos 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.211 2021/04/02 12:16:50 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.212 2021/04/12 15:55:26 christos Exp $"); #endif #include @@ -218,6 +218,7 @@ anonymize(sym_t *s) %token T_AT_CONSTRUCTOR %token T_AT_DEPRECATED %token T_AT_DESTRUCTOR +%token T_AT_FALLTHROUGH %token T_AT_FORMAT %token T_AT_FORMAT_ARG %token T_AT_FORMAT_GNU_PRINTF @@ -595,6 +596,9 @@ type_attribute_spec: | T_AT_WARN_UNUSED_RESULT | T_AT_WEAK | T_AT_VISIBILITY T_LPAREN constant_expr T_RPAREN + | T_AT_FALLTHROUGH { + fallthru(1); + } | T_QUAL { if ($1 != CONST) yyerror("Bad attribute"); @@ -1490,7 +1494,8 @@ direct_abstract_decl: ; non_expr_statement: - labeled_statement + type_attribute T_SEMI + | labeled_statement | compound_statement | selection_statement | iteration_statement @@ -1498,6 +1503,7 @@ non_expr_statement: seen_fallthrough = false; } | asm_statement + ; statement: /* C99 6.8 */ expr_statement Index: src/usr.bin/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.26 src/usr.bin/xlint/lint1/lex.c:1.27 --- src/usr.bin/xlint/lint1/lex.c:1.26 Fri Apr 9 11:58:43 2021 +++ src/usr.bin/xlint/lint1/lex.c Mon Apr 12 11:55:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.26 2021/04/09 15:58:43 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.27 2021/04/12 15:55:26 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: lex.c,v 1.26 2021/04/09 15:58:43 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.27 2021/04/12 15:55:26 christos Exp $"); #endif #include @@ -169,6 +169,7 @@ static struct kwtab { kwdef_token( "enum", T_ENUM, 0,0,0,0,1), kwdef_token( "extension", T_EXTENSION, 0,0,1,0,4), kwdef_sclass( "extern", EXTERN, 0,0,0,0,1), + kwdef_token( "fallthrough", T_AT_FALLTHROUGH, 0,0,1,1,5), kwdef_type( "float", FLOAT, 0,0,0,0,1), kwdef_token( "for", T_FOR, 0,0,0,0,1), kwdef_token( "format", T_AT_FORMAT, 0,0,1,1,5),
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Mon Apr 12 16:04:31 UTC 2021 Modified Files: src/usr.bin/make/unit-tests: varmod-sysv.exp varmod-sysv.mk Log Message: tests/make: add table test for the modifier ':from=to' Just to prevent any accidental change in the upcoming refactoring to reduce memory allocation in ApplyModifier_SysV. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-sysv.exp cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/varmod-sysv.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/varmod-sysv.exp diff -u src/usr.bin/make/unit-tests/varmod-sysv.exp:1.7 src/usr.bin/make/unit-tests/varmod-sysv.exp:1.8 --- src/usr.bin/make/unit-tests/varmod-sysv.exp:1.7 Tue Feb 23 00:04:48 2021 +++ src/usr.bin/make/unit-tests/varmod-sysv.exp Mon Apr 12 16:04:30 2021 @@ -1,5 +1,150 @@ make: Unfinished modifier for "word214" ('=' missing) make: "varmod-sysv.mk" line 214: Malformed conditional (${word214:L:from${:D=}to}) +word modifier result +'' ="" +suffix ="suffix" +prefix ="prefix" +pre-middle-suffix="pre-middle-suffix" +'' =NS "NS" +suffix =NS "suffixNS" +prefix =NS "prefixNS" +pre-middle-suffix=NS "pre-middle-suffixNS" +'' =% "%" +suffix =% "suffix%" +prefix =% "prefix%" +pre-middle-suffix=% "pre-middle-suffix%" +'' =%NS "%NS" +suffix =%NS "suffix%NS" +prefix =%NS "prefix%NS" +pre-middle-suffix=%NS "pre-middle-suffix%NS" +'' =NPre% "NPre%" +suffix =NPre% "suffixNPre%" +prefix =NPre% "prefixNPre%" +pre-middle-suffix=NPre% "pre-middle-suffixNPre%" +'' =NPre%NS "NPre%NS" +suffix =NPre%NS "suffixNPre%NS" +prefix =NPre%NS "prefixNPre%NS" +pre-middle-suffix=NPre%NS "pre-middle-suffixNPre%NS" +'' ffix="" +suffix ffix="su" +prefix ffix="prefix" +pre-middle-suffixffix="pre-middle-su" +'' ffix=NS "" +suffix ffix=NS "suNS" +prefix ffix=NS "prefix" +pre-middle-suffixffix=NS "pre-middle-suNS" +'' ffix=% "" +suffix ffix=% "su%" +prefix ffix=% "prefix" +pre-middle-suffixffix=% "pre-middle-su%" +'' ffix=%NS "" +suffix ffix=%NS "su%NS" +prefix ffix=%NS "prefix" +pre-middle-suffixffix=%NS "pre-middle-su%NS" +'' ffix=NPre% "" +suffix ffix=NPre% "suNPre%" +prefix ffix=NPre% "prefix" +pre-middle-suffixffix=NPre% "pre-middle-suNPre%" +'' ffix=NPre%NS "" +suffix ffix=NPre%NS "suNPre%NS" +prefix ffix=NPre%NS "prefix" +pre-middle-suffixffix=NPre%NS "pre-middle-suNPre%NS" +'' %= "" +suffix %= "" +prefix %= "" +pre-middle-suffix%= "" +'' %=NS "NS" +suffix %=NS "NS" +prefix %=NS "NS" +pre-middle-suffix%=NS "NS" +'' %=% "" +suffix %=% "suffix" +prefix %=% "prefix" +pre-middle-suffix%=% "pre-middle-suffix" +'' %=%NS"NS" +suffix %=%NS"su
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Mon Apr 12 16:09:57 UTC 2021 Modified Files: src/usr.bin/make/unit-tests: varmod-sysv.exp varmod-sysv.mk Log Message: tests/make: fix test for modifier ':from=to' I had forgotten to remove the single quotes, to produce a really empty word. Plus I had forgotten the modifier ':Q' for the result, which meant that the single quotes did not show up in the output. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varmod-sysv.exp cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-sysv.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/varmod-sysv.exp diff -u src/usr.bin/make/unit-tests/varmod-sysv.exp:1.8 src/usr.bin/make/unit-tests/varmod-sysv.exp:1.9 --- src/usr.bin/make/unit-tests/varmod-sysv.exp:1.8 Mon Apr 12 16:04:30 2021 +++ src/usr.bin/make/unit-tests/varmod-sysv.exp Mon Apr 12 16:09:57 2021 @@ -5,23 +5,23 @@ word modifier suffix ="suffix" prefix ="prefix" pre-middle-suffix="pre-middle-suffix" -'' =NS "NS" +'' =NS "" suffix =NS "suffixNS" prefix =NS "prefixNS" pre-middle-suffix=NS "pre-middle-suffixNS" -'' =% "%" +'' =% "" suffix =% "suffix%" prefix =% "prefix%" pre-middle-suffix=% "pre-middle-suffix%" -'' =%NS "%NS" +'' =%NS "" suffix =%NS "suffix%NS" prefix =%NS "prefix%NS" pre-middle-suffix=%NS "pre-middle-suffix%NS" -'' =NPre% "NPre%" +'' =NPre% "" suffix =NPre% "suffixNPre%" prefix =NPre% "prefixNPre%" pre-middle-suffix=NPre% "pre-middle-suffixNPre%" -'' =NPre%NS "NPre%NS" +'' =NPre%NS "" suffix =NPre%NS "suffixNPre%NS" prefix =NPre%NS "prefixNPre%NS" pre-middle-suffix=NPre%NS "pre-middle-suffixNPre%NS" @@ -53,7 +53,7 @@ pre-middle-suffixffix=NPre%NS suffix %= "" prefix %= "" pre-middle-suffix%= "" -'' %=NS "NS" +'' %=NS "" suffix %=NS "NS" prefix %=NS "NS" pre-middle-suffix%=NS "NS" @@ -61,15 +61,15 @@ pre-middle-suffix%=NS suffix %=% "suffix" prefix %=% "prefix" pre-middle-suffix%=% "pre-middle-suffix" -'' %=%NS"NS" +'' %=%NS"" suffix %=%NS"suffixNS" prefix %=%NS"prefixNS" pre-middle-suffix%=%NS"pre-middle-suffixNS" -'' %=NPre% "NPre" +'' %=NPre% "" suffix %=NPre% "NPresuffix" prefix %=NPre% "NPreprefix" pre-middle-suffix%=NPre% "NPrepre-middle-suffix" -'' %=NPre%NS"NPreNS" +'' %=NPre%NS"" suffix %=NPre%NS"NPresuffixNS" prefix %=NPre%NS"NPreprefixNS" pre-middle-suffix%=NPre%NS"NPrepre-middle-suffixNS" Index: src/usr.bin/make/unit-tests/varmod-sysv.mk diff -u src/usr.bin/make/unit-tests/varmod-sysv.mk:1.13 src/usr.bin/make/unit-tests/varmod-sysv.mk:1.14 --- src/usr.bin/make/unit-tests/varmod-sysv.mk:1.13 Mon Apr 12 16:04:30 2021 +++ src/usr.bin/make/unit-tests/varmod-sysv.mk Mon Apr 12 16:09:57 2021 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-sysv.mk,v 1.13 2021/04/12 16:04:30 rillig Exp $ +# $NetBSD: varmod-sysv.mk,v 1.14 2021/04/12 16:09:57 ri
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Apr 12 18:48:00 UTC 2021 Modified Files: src/usr.bin/make: str.h var.c Log Message: make: reduce memory allocation and strlen calls in modifier ':from=to' Previously, SysVMatch was quite verbose and felt like hand-optimized assembler code, which made it difficult to discover the underlying idea of the code. All this code was replaced with two simple calls to Substring_HasPrefix and Substring_HasSuffix. Now that the operands of that modifier are no longer passed as C strings, there is no need to collect all information in a single scan through the word and the pattern. It was not necessary to call Var_Subst unconditionally. Calling it only when the string contains a '$' saves another memory allocation and two string copies (because of the Buf_DoneDataCompact). No functional change. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/str.h cvs rdiff -u -r1.924 -r1.925 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/str.h diff -u src/usr.bin/make/str.h:1.5 src/usr.bin/make/str.h:1.6 --- src/usr.bin/make/str.h:1.5 Sun Apr 11 22:53:45 2021 +++ src/usr.bin/make/str.h Mon Apr 12 18:48:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: str.h,v 1.5 2021/04/11 22:53:45 rillig Exp $ */ +/* $NetBSD: str.h,v 1.6 2021/04/12 18:48:00 rillig Exp $ */ /* Copyright (c) 2021 Roland Illig @@ -190,6 +190,21 @@ Substring_Sub(Substring sub, size_t star return Substring_Init(sub.start + start, sub.start + end); } +MAKE_INLINE bool +Substring_HasPrefix(Substring sub, Substring prefix) +{ + return Substring_Length(sub) >= Substring_Length(prefix) && + memcmp(sub.start, prefix.start, Substring_Length(prefix)) == 0; +} + +MAKE_INLINE bool +Substring_HasSuffix(Substring sub, Substring suffix) +{ + size_t suffixLen = Substring_Length(suffix); + return Substring_Length(sub) >= suffixLen && + memcmp(sub.end - suffixLen, suffix.start, suffixLen) == 0; +} + MAKE_INLINE FStr Substring_Str(Substring sub) { @@ -197,6 +212,17 @@ Substring_Str(Substring sub) } MAKE_INLINE const char * +Substring_SkipFirst(Substring sub, char ch) +{ + const char *p; + + for (p = sub.start; p != sub.end; p++) + if (*p == ch) + return p + 1; + return sub.start; +} + +MAKE_INLINE const char * Substring_LastIndex(Substring sub, char ch) { const char *p; Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.924 src/usr.bin/make/var.c:1.925 --- src/usr.bin/make/var.c:1.924 Mon Apr 12 13:28:35 2021 +++ src/usr.bin/make/var.c Mon Apr 12 18:48:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.924 2021/04/12 13:28:35 rillig Exp $ */ +/* $NetBSD: var.c,v 1.925 2021/04/12 18:48:00 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.924 2021/04/12 13:28:35 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.925 2021/04/12 18:48:00 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -1441,69 +1441,11 @@ ModifyWord_NoMatch(Substring word, SepBu } #ifdef SYSVVARSUB - -/* - * Check word against pattern for a match (% is a wildcard). - * - * Input: - * word Word to examine - * pattern Pattern to examine against - * - * Results: - * Returns the start of the match, or NULL. - * out_match_len returns the length of the match, if any. - * out_hasPercent returns whether the pattern contains a percent. - */ -/* TODO: migrate to using Substring */ -static const char * -SysVMatch(const char *word, const char *pattern, - size_t *out_match_len, bool *out_hasPercent) -{ - const char *p = pattern; - const char *w = word; - const char *percent; - size_t w_len; - size_t p_len; - const char *w_tail; - - *out_hasPercent = false; - percent = strchr(p, '%'); - if (percent != NULL) { /* ${VAR:...%...=...} */ - *out_hasPercent = true; - if (w[0] == '\0') - return NULL; /* empty word does not match pattern */ - - /* check that the prefix matches */ - for (; p != percent && *w != '\0' && *w == *p; w++, p++) - continue; - if (p != percent) - return NULL; /* No match */ - - p++; /* Skip the percent */ - if (*p == '\0') { - /* No more pattern, return the rest of the string */ - *out_match_len = strlen(w); - return w; - } - } - - /* Test whether the tail matches */ - w_len = strlen(w); - p_len = strlen(p); - if (w_len < p_len) - return NULL; - - w_tail = w + w_len - p_len; - if (memcmp(p, w_tail, p_len) != 0) - return NULL; - - *out_match_len = (size_t)(w_tail - w); - return w; -} - struct ModifyWord_SYSVSubstArgs { GNode *scope; - const char *lhs; + Substring lhsPrefix; + bool lhsPercent; + Substring lhsSuffix; const char *rhs; }; @@ -1512,43 +1454,40 @@ static void ModifyWord_SYSVSubst(Substring word, SepBuf *buf, void *data) { co
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Mon Apr 12 18:53:51 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: spell SysV in mixed case No functional change. To generate a diff of this commit: cvs rdiff -u -r1.925 -r1.926 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.925 src/usr.bin/make/var.c:1.926 --- src/usr.bin/make/var.c:1.925 Mon Apr 12 18:48:00 2021 +++ src/usr.bin/make/var.c Mon Apr 12 18:53:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.925 2021/04/12 18:48:00 rillig Exp $ */ +/* $NetBSD: var.c,v 1.926 2021/04/12 18:53:51 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.925 2021/04/12 18:48:00 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.926 2021/04/12 18:53:51 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -1441,7 +1441,7 @@ ModifyWord_NoMatch(Substring word, SepBu } #ifdef SYSVVARSUB -struct ModifyWord_SYSVSubstArgs { +struct ModifyWord_SysVSubstArgs { GNode *scope; Substring lhsPrefix; bool lhsPercent; @@ -1451,9 +1451,9 @@ struct ModifyWord_SYSVSubstArgs { /* Callback for ModifyWords to implement the :%.from=%.to modifier. */ static void -ModifyWord_SYSVSubst(Substring word, SepBuf *buf, void *data) +ModifyWord_SysVSubst(Substring word, SepBuf *buf, void *data) { - const struct ModifyWord_SYSVSubstArgs *args = data; + const struct ModifyWord_SysVSubstArgs *args = data; FStr rhs; char *rhsExp; const char *percent; @@ -3587,7 +3587,7 @@ ApplyModifier_SysV(const char **pp, ModC VarParseResult res; LazyBuf lhsBuf, rhsBuf; FStr rhs; - struct ModifyWord_SYSVSubstArgs args; + struct ModifyWord_SysVSubstArgs args; Substring lhs; const char *lhsSuffix; @@ -3642,7 +3642,7 @@ ApplyModifier_SysV(const char **pp, ModC args.lhsSuffix = Substring_Init(lhsSuffix, lhs.end); args.rhs = rhs.str; - ModifyWords(ch, ModifyWord_SYSVSubst, &args, ch->oneBigWord); + ModifyWords(ch, ModifyWord_SysVSubst, &args, ch->oneBigWord); done: LazyBuf_Done(&lhsBuf);
CVS commit: src/lib/libc/rpc
Module Name:src Committed By: mrg Date: Tue Apr 13 00:29:22 UTC 2021 Modified Files: src/lib/libc/rpc: getrpcent.c Log Message: pass dest buffer size to strncpy() and ensure nul termination. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/rpc/getrpcent.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/rpc/getrpcent.c diff -u src/lib/libc/rpc/getrpcent.c:1.23 src/lib/libc/rpc/getrpcent.c:1.24 --- src/lib/libc/rpc/getrpcent.c:1.23 Mon Mar 11 20:19:29 2013 +++ src/lib/libc/rpc/getrpcent.c Tue Apr 13 00:29:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: getrpcent.c,v 1.23 2013/03/11 20:19:29 tron Exp $ */ +/* $NetBSD: getrpcent.c,v 1.24 2021/04/13 00:29:22 mrg Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -36,7 +36,7 @@ #if 0 static char *sccsid = "@(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro"; #else -__RCSID("$NetBSD: getrpcent.c,v 1.23 2013/03/11 20:19:29 tron Exp $"); +__RCSID("$NetBSD: getrpcent.c,v 1.24 2021/04/13 00:29:22 mrg Exp $"); #endif #endif @@ -185,7 +185,8 @@ interpret(char *val, size_t len) if (d == 0) return (0); - (void) strncpy(d->line, val, len); + strncpy(d->line, val, sizeof(d->line) - 1); + d->line[sizeof(d->line) - 1] = '\0'; p = d->line; d->line[len] = '\n'; if (*p == '#')
CVS commit: src/lib/libform
Module Name:src Committed By: mrg Date: Tue Apr 13 00:29:42 UTC 2021 Modified Files: src/lib/libform: type_alnum.c type_alpha.c Log Message: allocate the potential trailing nul as well. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libform/type_alnum.c cvs rdiff -u -r1.11 -r1.12 src/lib/libform/type_alpha.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/libform/type_alnum.c diff -u src/lib/libform/type_alnum.c:1.10 src/lib/libform/type_alnum.c:1.11 --- src/lib/libform/type_alnum.c:1.10 Wed Nov 24 11:57:09 2004 +++ src/lib/libform/type_alnum.c Tue Apr 13 00:29:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: type_alnum.c,v 1.10 2004/11/24 11:57:09 blymn Exp $ */ +/* $NetBSD: type_alnum.c,v 1.11 2021/04/13 00:29:42 mrg Exp $ */ /*- * Copyright (c) 1998-1999 Brett Lymn @@ -133,7 +133,7 @@ alnum_check_field(FIELD *field, char *ar if (buf[cur] != '\0') return FALSE; - if ((new = (char *) malloc(sizeof(char) * (end - start))) == NULL) + if ((new = (char *) malloc(sizeof(char) * (end - start + 1))) == NULL) return FALSE; if ((end - start) >= 1) { Index: src/lib/libform/type_alpha.c diff -u src/lib/libform/type_alpha.c:1.11 src/lib/libform/type_alpha.c:1.12 --- src/lib/libform/type_alpha.c:1.11 Wed Nov 24 11:57:09 2004 +++ src/lib/libform/type_alpha.c Tue Apr 13 00:29:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: type_alpha.c,v 1.11 2004/11/24 11:57:09 blymn Exp $ */ +/* $NetBSD: type_alpha.c,v 1.12 2021/04/13 00:29:42 mrg Exp $ */ /*- * Copyright (c) 1998-1999 Brett Lymn @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: type_alpha.c,v 1.11 2004/11/24 11:57:09 blymn Exp $"); +__RCSID("$NetBSD: type_alpha.c,v 1.12 2021/04/13 00:29:42 mrg Exp $"); #include #include @@ -136,7 +136,7 @@ alpha_check_field(FIELD *field, char *ar return FALSE; /* set buffer 0 to the new string */ - if ((new = (char *) malloc(sizeof(char) * (end - start))) == NULL) + if ((new = (char *) malloc(sizeof(char) * (end - start + 1))) == NULL) return FALSE; if ((end - start) >= 1) {
CVS commit: src/lib/libpthread
Module Name:src Committed By: mrg Date: Tue Apr 13 00:31:54 UTC 2021 Modified Files: src/lib/libpthread: pthread.c Log Message: fake-use alloca()'s return value to quieten -Werror=unused-result To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/lib/libpthread/pthread.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/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.178 src/lib/libpthread/pthread.c:1.179 --- src/lib/libpthread/pthread.c:1.178 Wed Jul 22 01:24:39 2020 +++ src/lib/libpthread/pthread.c Tue Apr 13 00:31:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.178 2020/07/22 01:24:39 msaitoh Exp $ */ +/* $NetBSD: pthread.c,v 1.179 2021/04/13 00:31:54 mrg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: pthread.c,v 1.178 2020/07/22 01:24:39 msaitoh Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.179 2021/04/13 00:31:54 mrg Exp $"); #define __EXPOSE_STACK 1 @@ -535,6 +535,7 @@ pthread__create_tramp(void *cookie) { pthread_t self; void *retval; + void *junk __unused; self = cookie; @@ -544,7 +545,7 @@ pthread__create_tramp(void *cookie) * be allocating stacks on fixed 2MB boundaries. Needs a * thread register or decent thread local storage. */ - (void)alloca(((unsigned)self->pt_lid & 7) << 8); + junk = alloca(((unsigned)self->pt_lid & 7) << 8); if (self->pt_name != NULL) { pthread_mutex_lock(&self->pt_lock);
CVS commit: src/sys/sys
Module Name:src Committed By: mrg Date: Tue Apr 13 01:10:24 UTC 2021 Modified Files: src/sys/sys: sysctl.h Log Message: in struct evcnt_sysctl, change ev_strings[0] to ev_strings[]. GCC 10 does not like accesses to zero length arrays. To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/sys/sys/sysctl.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/sys/sysctl.h diff -u src/sys/sys/sysctl.h:1.232 src/sys/sys/sysctl.h:1.233 --- src/sys/sys/sysctl.h:1.232 Thu Apr 1 06:22:10 2021 +++ src/sys/sys/sysctl.h Tue Apr 13 01:10:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.h,v 1.232 2021/04/01 06:22:10 simonb Exp $ */ +/* $NetBSD: sysctl.h,v 1.233 2021/04/13 01:10:24 mrg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -721,7 +721,7 @@ struct evcnt_sysctl { * Now the group and name strings follow (both include the trailing * NUL). ev_name start at &ev_strings[ev_grouplen+1] */ - char ev_strings[0]; + char ev_strings[]; }; #define KERN_EVCNT_COUNT_ANY 0
CVS commit: src
Module Name:src Committed By: mrg Date: Tue Apr 13 01:11:06 UTC 2021 Modified Files: src/external/bsd/top/bin: Makefile src/external/gpl3/gdb: Makefile.inc src/usr.sbin/racoon: Makefile Log Message: apply -fcommon to sources that still rely upon it. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/bsd/top/bin/Makefile cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb/Makefile.inc cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/racoon/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/top/bin/Makefile diff -u src/external/bsd/top/bin/Makefile:1.11 src/external/bsd/top/bin/Makefile:1.12 --- src/external/bsd/top/bin/Makefile:1.11 Sun Oct 13 07:28:07 2019 +++ src/external/bsd/top/bin/Makefile Tue Apr 13 01:11:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:07 mrg Exp $ +# $NetBSD: Makefile,v 1.12 2021/04/13 01:11:05 mrg Exp $ .include @@ -41,4 +41,6 @@ COPTS.display.c = -Wno-format-nonliteral COPTS.commands.c+= ${GCC_NO_CAST_FUNCTION_TYPE} +COPTS+= -fcommon + .include Index: src/external/gpl3/gdb/Makefile.inc diff -u src/external/gpl3/gdb/Makefile.inc:1.11 src/external/gpl3/gdb/Makefile.inc:1.12 --- src/external/gpl3/gdb/Makefile.inc:1.11 Sun Oct 16 04:36:52 2016 +++ src/external/gpl3/gdb/Makefile.inc Tue Apr 13 01:11:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2016/10/16 04:36:52 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.12 2021/04/13 01:11:05 mrg Exp $ USE_LIBEDIT=no USE_TUI=yes @@ -14,4 +14,6 @@ CWARNFLAGS.clang+= -Wno-unused-value -Wn -Wno-tautological-compare -Wno-format-extra-args \ -Wno-string-plus-int +COPTS+= -fcommon + DIST:= ${.PARSEDIR}/dist Index: src/usr.sbin/racoon/Makefile diff -u src/usr.sbin/racoon/Makefile:1.38 src/usr.sbin/racoon/Makefile:1.39 --- src/usr.sbin/racoon/Makefile:1.38 Wed Dec 2 02:21:43 2020 +++ src/usr.sbin/racoon/Makefile Tue Apr 13 01:11:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2020/12/02 02:21:43 rin Exp $ +# $NetBSD: Makefile,v 1.39 2021/04/13 01:11:05 mrg Exp $ WARNS?= 0 # XXX third-party program, many issues NOCLANGERROR= # defined @@ -83,4 +83,6 @@ prsa_par.c: ${DIST}/src/racoon/prsa_par. CWARNFLAGS.gcc+=${GCC_NO_ADDR_OF_PACKED_MEMBER} +COPTS+= -fcommon + .include
CVS commit: src/external/mpl/bind
Module Name:src Committed By: mrg Date: Tue Apr 13 01:15:57 UTC 2021 Modified Files: src/external/mpl/bind: Makefile.inc Log Message: use -fcommon. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/mpl/bind/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/bind/Makefile.inc diff -u src/external/mpl/bind/Makefile.inc:1.10 src/external/mpl/bind/Makefile.inc:1.11 --- src/external/mpl/bind/Makefile.inc:1.10 Fri Feb 19 16:42:08 2021 +++ src/external/mpl/bind/Makefile.inc Tue Apr 13 01:15:57 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.10 2021/02/19 16:42:08 christos Exp $ +# $NetBSD: Makefile.inc,v 1.11 2021/04/13 01:15:57 mrg Exp $ .if !defined(BIND9_MAKEFILE_INC) BIND9_MAKEFILE_INC=yes @@ -141,3 +141,5 @@ CPPFLAGS+=-I${IDIST}/lib/isc/nothreads/i .include "${.PARSEDIR}/../Makefile.inc" .endif .endif + +COPTS+= -fcommon
CVS commit: src/usr.bin/checknr
Module Name:src Committed By: mrg Date: Tue Apr 13 01:38:04 UTC 2021 Modified Files: src/usr.bin/checknr: checknr.c Log Message: properly terminate a string after strncpy(). To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/checknr/checknr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/checknr/checknr.c diff -u src/usr.bin/checknr/checknr.c:1.24 src/usr.bin/checknr/checknr.c:1.25 --- src/usr.bin/checknr/checknr.c:1.24 Mon Aug 12 14:03:18 2013 +++ src/usr.bin/checknr/checknr.c Tue Apr 13 01:38:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: checknr.c,v 1.24 2013/08/12 14:03:18 joerg Exp $ */ +/* $NetBSD: checknr.c,v 1.25 2021/04/13 01:38:04 mrg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)checknr.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: checknr.c,v 1.24 2013/08/12 14:03:18 joerg Exp $"); +__RCSID("$NetBSD: checknr.c,v 1.25 2021/04/13 01:38:04 mrg Exp $"); #endif #endif /* not lint */ @@ -325,6 +325,7 @@ process(FILE *f) * find and isolate the macro/command name. */ strncpy(mac, line+1, 4); + mac[4] = '\0'; if (isspace((unsigned char)mac[0])) { pe(lineno); printf("Empty command\n");
CVS commit: src/games/robots
Module Name:src Committed By: mrg Date: Tue Apr 13 01:50:46 UTC 2021 Modified Files: src/games/robots: score.c Log Message: properly terminate after using strncpy(). To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/games/robots/score.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/robots/score.c diff -u src/games/robots/score.c:1.23 src/games/robots/score.c:1.24 --- src/games/robots/score.c:1.23 Wed Aug 12 08:30:55 2009 +++ src/games/robots/score.c Tue Apr 13 01:50:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: score.c,v 1.23 2009/08/12 08:30:55 dholland Exp $ */ +/* $NetBSD: score.c,v 1.24 2021/04/13 01:50:46 mrg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: score.c,v 1.23 2009/08/12 08:30:55 dholland Exp $"); +__RCSID("$NetBSD: score.c,v 1.24 2021/04/13 01:50:46 mrg Exp $"); #endif #endif /* not lint */ @@ -198,9 +198,10 @@ set_name(SCORE *scp) struct passwd *pp; if ((pp = getpwuid(scp->s_uid)) == NULL) - strncpy(scp->s_name, "???", MAXNAME); + strncpy(scp->s_name, "???", MAXNAME - 1); else - strncpy(scp->s_name, pp->pw_name, MAXNAME); + strncpy(scp->s_name, pp->pw_name, MAXNAME - 1); + scp->s_name[MAXNAME - 1] = '\0'; } /*
CVS commit: src/usr.bin/usbhidaction
Module Name:src Committed By: mrg Date: Tue Apr 13 02:07:35 UTC 2021 Modified Files: src/usr.bin/usbhidaction: usbhidaction.c Log Message: increase the size of a buffer by 1 byte. i think GCC 10 is right here. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/usbhidaction/usbhidaction.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/usbhidaction/usbhidaction.c diff -u src/usr.bin/usbhidaction/usbhidaction.c:1.29 src/usr.bin/usbhidaction/usbhidaction.c:1.30 --- src/usr.bin/usbhidaction/usbhidaction.c:1.29 Tue May 15 01:41:29 2018 +++ src/usr.bin/usbhidaction/usbhidaction.c Tue Apr 13 02:07:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: usbhidaction.c,v 1.29 2018/05/15 01:41:29 jmcneill Exp $ */ +/* $NetBSD: usbhidaction.c,v 1.30 2021/04/13 02:07:35 mrg Exp $ */ /* * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: usbhidaction.c,v 1.29 2018/05/15 01:41:29 jmcneill Exp $"); +__RCSID("$NetBSD: usbhidaction.c,v 1.30 2021/04/13 02:07:35 mrg Exp $"); #endif #include @@ -240,7 +240,7 @@ parse_conf(const char *conf, report_desc char *p; int line; char buf[SIZE], name[SIZE], value[SIZE], action[SIZE]; - char usagestr[SIZE], coll[SIZE]; + char usagestr[SIZE+1], coll[SIZE]; struct command *cmd, *cmds; struct hid_data *d; struct hid_item h;
CVS commit: src/games/backgammon/common_source
Module Name:src Committed By: mrg Date: Tue Apr 13 02:11:40 UTC 2021 Modified Files: src/games/backgammon/common_source: Makefile fancy.c Log Message: no longer need -Wno-error=implicit-fallthrough. don't provide common symbols that are in libterminfo now days. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/games/backgammon/common_source/Makefile cvs rdiff -u -r1.15 -r1.16 src/games/backgammon/common_source/fancy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/backgammon/common_source/Makefile diff -u src/games/backgammon/common_source/Makefile:1.11 src/games/backgammon/common_source/Makefile:1.12 --- src/games/backgammon/common_source/Makefile:1.11 Sun Sep 29 23:44:59 2019 +++ src/games/backgammon/common_source/Makefile Tue Apr 13 02:11:39 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2019/09/29 23:44:59 mrg Exp $ +# $NetBSD: Makefile,v 1.12 2021/04/13 02:11:39 mrg Exp $ LIBISPRIVATE= yes @@ -6,11 +6,4 @@ LIB= common SRCS= allow.c board.c check.c fancy.c init.c odds.c \ one.c save.c subs.c table.c -.include - -# Has fallthru comment that is missed -.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" -COPTS.check.c+= -Wno-error=implicit-fallthrough -.endif - .include Index: src/games/backgammon/common_source/fancy.c diff -u src/games/backgammon/common_source/fancy.c:1.15 src/games/backgammon/common_source/fancy.c:1.16 --- src/games/backgammon/common_source/fancy.c:1.15 Wed Apr 22 23:36:26 2020 +++ src/games/backgammon/common_source/fancy.c Tue Apr 13 02:11:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fancy.c,v 1.15 2020/04/22 23:36:26 joerg Exp $ */ +/* $NetBSD: fancy.c,v 1.16 2021/04/13 02:11:39 mrg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)fancy.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fancy.c,v 1.15 2020/04/22 23:36:26 joerg Exp $"); +__RCSID("$NetBSD: fancy.c,v 1.16 2021/04/13 02:11:39 mrg Exp $"); #endif #endif /* not lint */ @@ -52,8 +52,10 @@ static void newline(void); * * XXX: rewrite this crap using curses. */ +#if 0 charPC; /* padding character */ char *BC; /* backspace sequence */ +#endif char *CD; /* clear to end of screen sequence */ char *CE; /* clear to end of line sequence */ char *CL; /* clear screen sequence */ @@ -62,7 +64,9 @@ char *HO; /* home cursor sequence */ char *MC; /* column cursor movement map */ char *ML; /* row cursor movement map */ char *ND; /* forward cursor sequence */ +#if 0 char *UP; /* up cursor sequence */ +#endif static int lHO; /* length of HO */ static int lBC; /* length of BC */
CVS commit: src/usr.bin/config
Module Name:src Committed By: mrg Date: Tue Apr 13 03:09:42 UTC 2021 Modified Files: src/usr.bin/config: sem.c Log Message: ensure that pointer is filled in when used upon return. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/usr.bin/config/sem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/sem.c diff -u src/usr.bin/config/sem.c:1.84 src/usr.bin/config/sem.c:1.85 --- src/usr.bin/config/sem.c:1.84 Sat Mar 7 19:26:13 2020 +++ src/usr.bin/config/sem.c Tue Apr 13 03:09:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sem.c,v 1.84 2020/03/07 19:26:13 christos Exp $ */ +/* $NetBSD: sem.c,v 1.85 2021/04/13 03:09:42 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include -__RCSID("$NetBSD: sem.c,v 1.84 2020/03/07 19:26:13 christos Exp $"); +__RCSID("$NetBSD: sem.c,v 1.85 2021/04/13 03:09:42 mrg Exp $"); #include #include @@ -828,10 +828,10 @@ getrefattr(const char *name, struct attr /* * Check if the existing attr is only referenced, not really defined. */ + *ra = a; if (a->a_deps == NULL && a->a_iattr == 0 && a->a_devclass == 0) { - *ra = a; return (0); } return (1);
CVS commit: src/sys
Module Name:src Committed By: mrg Date: Tue Apr 13 03:27:14 UTC 2021 Modified Files: src/sys/dev/ic: ath.c src/sys/external/isc/atheros_hal/dist: ah_eeprom_v1.c ah_eeprom_v14.c ah_eeprom_v3.c ah_eeprom_v4k.c src/sys/external/isc/atheros_hal/dist/ar5212: ar5212_attach.c ar5212_xmit.c Log Message: use correct enum types for various functions. To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/dev/ic/ath.c cvs rdiff -u -r1.4 -r1.5 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c \ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v4k.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_attach.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.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/ic/ath.c diff -u src/sys/dev/ic/ath.c:1.133 src/sys/dev/ic/ath.c:1.134 --- src/sys/dev/ic/ath.c:1.133 Mon Nov 16 00:12:13 2020 +++ src/sys/dev/ic/ath.c Tue Apr 13 03:27:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ath.c,v 1.133 2020/11/16 00:12:13 msaitoh Exp $ */ +/* $NetBSD: ath.c,v 1.134 2021/04/13 03:27:13 mrg Exp $ */ /*- * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.133 2020/11/16 00:12:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.134 2021/04/13 03:27:13 mrg Exp $"); #endif /* @@ -728,7 +728,7 @@ ath_resume(struct ath_softc *sc) #if notyet ath_hal_setpower(ah, HAL_PM_AWAKE); #else - ath_hal_reset(ah, ic->ic_opmode, &sc->sc_curchan, AH_FALSE, &status); + ath_hal_reset(ah, ic->ic_opmode, &sc->sc_curchan, HAL_M_IBSS, &status); #endif /* Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c:1.4 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c:1.5 --- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c:1.4 Fri Dec 12 21:31:49 2008 +++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v1.c Tue Apr 13 03:27:13 2021 @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom_v1.c,v 1.4 2008/12/12 21:31:49 alc Exp $ + * $Id: ah_eeprom_v1.c,v 1.5 2021/04/13 03:27:13 mrg Exp $ */ #include "opt_ah.h" @@ -71,7 +71,7 @@ v1EepromGet(struct ath_hal *ah, int para static HAL_BOOL v1EepromSet(struct ath_hal *ah, int param, int v) { - return HAL_EINVAL; + return AH_FALSE; } static HAL_BOOL Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c diff -u src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c:1.4 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c:1.5 --- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c:1.4 Thu Sep 12 11:26:53 2013 +++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c Tue Apr 13 03:27:13 2021 @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom_v3.c,v 1.4 2013/09/12 11:26:53 martin Exp $ + * $Id: ah_eeprom_v3.c,v 1.5 2021/04/13 03:27:13 mrg Exp $ */ #include "opt_ah.h" @@ -1671,45 +1671,45 @@ legacyEepromSet(struct ath_hal *ah, int switch (param) { case AR_EEP_AMODE: ee->ee_Amode = v; - return HAL_OK; + return AH_TRUE; case AR_EEP_BMODE: ee->ee_Bmode = v; - return HAL_OK; + return AH_TRUE; case AR_EEP_GMODE: ee->ee_Gmode = v; - return HAL_OK; + return AH_TRUE; case AR_EEP_TURBO5DISABLE: ee->ee_turbo5Disable = v; - return HAL_OK; + return AH_TRUE; case AR_EEP_TURBO2DISABLE: ee->ee_turbo2Disable = v; - return HAL_OK; + return AH_TRUE; case AR_EEP_COMPRESS: if (v) ee->ee_opCap &= ~AR_EEPROM_EEPCAP_COMPRESS_DIS; else ee->ee_opCap |= AR_EEPROM_EEPCAP_COMPRESS_DIS; - return HAL_OK; + return AH_TRUE; case AR_EEP_FASTFRAME: if (v) ee->ee_opCap &= ~AR_EEPROM_EEPCAP_FASTFRAME_DIS; else ee->ee_opCap |= AR_EEPROM_EEPCAP_FASTFRAME_DIS; - return HAL_OK; + return AH_TRUE; case AR_EEP_AES: if (v) ee->ee_opCap &= ~AR_EEPROM_EEPCAP_AES_DIS; else ee->ee_opCap |= AR_EEPROM_EEPCAP_AES_DIS; - return HAL_OK; + return AH_TRUE; case AR_EEP_BURST: if (v) ee->ee_opCap &= ~AR_EEPROM_EEPCAP_BURST_DIS; else ee->ee_opCap |= AR_EEPROM_EEPCAP_BURST_DIS; - return HAL_OK; + return AH_TRUE; } - return HAL_EINVAL; + return AH_FALSE; } static HAL_BOOL Index: src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c diff -u src/sys/external/isc/atheros_hal/di
CVS commit: src/sys/dev/ic
Module Name:src Committed By: mrg Date: Tue Apr 13 04:13:52 UTC 2021 Modified Files: src/sys/dev/ic: bwfm.c Log Message: remove extra line that clearly isn't meant to be there and may trigger uninitialised reads of variables. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/bwfm.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/ic/bwfm.c diff -u src/sys/dev/ic/bwfm.c:1.29 src/sys/dev/ic/bwfm.c:1.30 --- src/sys/dev/ic/bwfm.c:1.29 Wed Jul 22 17:23:52 2020 +++ src/sys/dev/ic/bwfm.c Tue Apr 13 04:13:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bwfm.c,v 1.29 2020/07/22 17:23:52 riastradh Exp $ */ +/* $NetBSD: bwfm.c,v 1.30 2021/04/13 04:13:52 mrg Exp $ */ /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -166,7 +166,6 @@ bwfm_firmware_read_file(struct bwfm_soft names[1] = kmem_asprintf("%s.%s", fwp->fwsel_basename, bwfm_firmware_filetypes[which].suffix); - if (ctx->ctx_model) names[0] = ctx->ctx_model ? kmem_asprintf("%s.%s.%s", fwp->fwsel_basename, ctx->ctx_model, bwfm_firmware_filetypes[which].suffix) : NULL;
CVS commit: src/external/mpl/dhcp
Module Name:src Committed By: mrg Date: Tue Apr 13 04:14:46 UTC 2021 Modified Files: src/external/mpl/dhcp: Makefile.inc Log Message: use -fcommon here too. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/mpl/dhcp/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/dhcp/Makefile.inc diff -u src/external/mpl/dhcp/Makefile.inc:1.9 src/external/mpl/dhcp/Makefile.inc:1.10 --- src/external/mpl/dhcp/Makefile.inc:1.9 Sat Feb 20 01:43:04 2021 +++ src/external/mpl/dhcp/Makefile.inc Tue Apr 13 04:14:46 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.9 2021/02/20 01:43:04 christos Exp $ +# $NetBSD: Makefile.inc,v 1.10 2021/04/13 04:14:46 mrg Exp $ WARNS?= 1 # XXX -Wshadow -Wcast-qual -Wsign-compare @@ -61,3 +61,5 @@ LDADD+=-Wl,-Bdynamic .endif DPADD+= ${COBJDIR}/libdhcp.a DPADD+= ${OMOBJDIR}/libomapi.a + +COPTS+= -fcommon
CVS commit: src/external/cddl/osnet
Module Name:src Committed By: mrg Date: Tue Apr 13 04:52:01 UTC 2021 Modified Files: src/external/cddl/osnet: Makefile.inc Makefile.zfs Log Message: use -fcommon here. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/Makefile.inc cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/Makefile.zfs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/Makefile.inc diff -u src/external/cddl/osnet/Makefile.inc:1.5 src/external/cddl/osnet/Makefile.inc:1.6 --- src/external/cddl/osnet/Makefile.inc:1.5 Sat Jun 29 20:50:01 2019 +++ src/external/cddl/osnet/Makefile.inc Tue Apr 13 04:52:00 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 2019/06/29 20:50:01 sevan Exp $ +# $NetBSD: Makefile.inc,v 1.6 2021/04/13 04:52:00 mrg Exp $ # $FreeBSD: head/cddl/Makefile.inc 270358 2014-08-22 20:04:51Z delphij $ WARNS?=5 @@ -9,3 +9,5 @@ OPENSOLARIS_USR_DISTDIR=${OSNETDIR}/dist OPENSOLARIS_SYS_DISTDIR=${OSNETDIR}/dist CPPFLAGS+=-Wno-unknown-pragmas -Wno-sign-compare -D_KERNTYPES + +COPTS+= -fcommon Index: src/external/cddl/osnet/Makefile.zfs diff -u src/external/cddl/osnet/Makefile.zfs:1.9 src/external/cddl/osnet/Makefile.zfs:1.10 --- src/external/cddl/osnet/Makefile.zfs:1.9 Sat Jun 22 09:48:39 2019 +++ src/external/cddl/osnet/Makefile.zfs Tue Apr 13 04:52:00 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.zfs,v 1.9 2019/06/22 09:48:39 hannken Exp $ +# $NetBSD: Makefile.zfs,v 1.10 2021/04/13 04:52:00 mrg Exp $ .include @@ -56,3 +56,5 @@ LIBUUTIL_SRCDIR= ${ZFSDIR}/lib/libuutil LIBZFS_SRCDIR= ${ZFSDIR}/lib/libzfs LIBZFS_CORE_SRCDIR= ${ZFSDIR}/lib/libzfs_core LIBZPOOL_SRCDIR= ${ZFSDIR}/lib/libzpool + +COPTS+= -fcommon
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Tue Apr 13 04:53:22 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Hold the lock for pppoe while referencing sc_id that is an item of struct pppoe_softc To generate a diff of this commit: cvs rdiff -u -r1.158 -r1.159 src/sys/net/if_pppoe.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/net/if_pppoe.c diff -u src/sys/net/if_pppoe.c:1.158 src/sys/net/if_pppoe.c:1.159 --- src/sys/net/if_pppoe.c:1.158 Wed Nov 25 10:42:35 2020 +++ src/sys/net/if_pppoe.c Tue Apr 13 04:53:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.158 2020/11/25 10:42:35 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.159 2021/04/13 04:53:22 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.158 2020/11/25 10:42:35 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.159 2021/04/13 04:53:22 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -532,10 +532,11 @@ pppoe_find_softc_by_hunique(uint8_t *tok memcpy(&t, token, len); LIST_FOREACH(sc, &pppoe_softc_list, sc_list) { + PPPOE_LOCK(sc, lock); if (sc->sc_id == t) { - PPPOE_LOCK(sc, lock); break; } + PPPOE_UNLOCK(sc); } rw_exit(&pppoe_softc_list_lock);
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Tue Apr 13 04:57:15 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Added a NULL check for parent interface of pppoe To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/net/if_pppoe.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/net/if_pppoe.c diff -u src/sys/net/if_pppoe.c:1.159 src/sys/net/if_pppoe.c:1.160 --- src/sys/net/if_pppoe.c:1.159 Tue Apr 13 04:53:22 2021 +++ src/sys/net/if_pppoe.c Tue Apr 13 04:57:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.159 2021/04/13 04:53:22 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.160 2021/04/13 04:57:15 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.159 2021/04/13 04:53:22 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.160 2021/04/13 04:57:15 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -533,7 +533,7 @@ pppoe_find_softc_by_hunique(uint8_t *tok LIST_FOREACH(sc, &pppoe_softc_list, sc_list) { PPPOE_LOCK(sc, lock); - if (sc->sc_id == t) { + if (sc->sc_id == t && sc->sc_eth_if != NULL) { break; } PPPOE_UNLOCK(sc);
CVS commit: src
Module Name:src Committed By: mrg Date: Tue Apr 13 04:59:00 UTC 2021 Modified Files: src/external/bsd/ntp/bin/ntpdc: Makefile src/external/bsd/ntp/lib/libntp: Makefile src/external/bsd/tmux/usr.bin/tmux: Makefile src/external/gpl3/binutils/lib/libbfd: Makefile src/external/mit/xorg/lib/dri: Makefile src/external/mit/xorg/lib/gallium: Makefile src/external/mit/xorg/lib/libXfont: Makefile src/external/mit/xorg/lib/libXfont2: Makefile src/sys/external/bsd/drm2/i915drm: files.i915drmkms src/sys/modules/i915drmkms: Makefile src/usr.sbin/sysinst: Makefile.inc Log Message: apply some -Wno- to ignore several new warnings with GCC 10. ntp: ignore truncation beyond api sizes, and ignore wrongly guessed underflow tmux: ignore maybe uninitialised warning for impossible case libbfd: signed/unsigned variables assigned in the same statement dri/gallium: -Wno-builtin-declaration-mismatch for u_atomic.c as it implements backend functions with different in-C-machine but same-in-real-machine types libXfont/libXfont2: signed/unsigned variables assigned in the same statement i915drm: ignore impossible maybe uninitialised warnings sysinst: ignore an invalid string truncation issue To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/ntp/bin/ntpdc/Makefile cvs rdiff -u -r1.24 -r1.25 src/external/bsd/ntp/lib/libntp/Makefile cvs rdiff -u -r1.25 -r1.26 src/external/bsd/tmux/usr.bin/tmux/Makefile cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/binutils/lib/libbfd/Makefile cvs rdiff -u -r1.36 -r1.37 src/external/mit/xorg/lib/dri/Makefile cvs rdiff -u -r1.45 -r1.46 src/external/mit/xorg/lib/gallium/Makefile cvs rdiff -u -r1.11 -r1.12 src/external/mit/xorg/lib/libXfont/Makefile cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/libXfont2/Makefile cvs rdiff -u -r1.39 -r1.40 src/sys/external/bsd/drm2/i915drm/files.i915drmkms cvs rdiff -u -r1.16 -r1.17 src/sys/modules/i915drmkms/Makefile cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/sysinst/Makefile.inc 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/bin/ntpdc/Makefile diff -u src/external/bsd/ntp/bin/ntpdc/Makefile:1.7 src/external/bsd/ntp/bin/ntpdc/Makefile:1.8 --- src/external/bsd/ntp/bin/ntpdc/Makefile:1.7 Sun Oct 11 07:07:31 2020 +++ src/external/bsd/ntp/bin/ntpdc/Makefile Tue Apr 13 04:58:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2020/10/11 07:07:31 rin Exp $ +# $NetBSD: Makefile,v 1.8 2021/04/13 04:58:59 mrg Exp $ .include @@ -24,4 +24,6 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/ CLEANFILES+=${MAN} +COPTS.ntpdc.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-array-bounds :} + .include Index: src/external/bsd/ntp/lib/libntp/Makefile diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.24 src/external/bsd/ntp/lib/libntp/Makefile:1.25 --- src/external/bsd/ntp/lib/libntp/Makefile:1.24 Fri May 29 20:16:07 2020 +++ src/external/bsd/ntp/lib/libntp/Makefile Tue Apr 13 04:58:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2020/05/29 20:16:07 christos Exp $ +# $NetBSD: Makefile,v 1.25 2021/04/13 04:58:59 mrg Exp $ LIBISPRIVATE=yes @@ -102,5 +102,7 @@ CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIM .endif COPTS.timetoa.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.socktoa.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :} +COPTS.socktohost.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :} .include Index: src/external/bsd/tmux/usr.bin/tmux/Makefile diff -u src/external/bsd/tmux/usr.bin/tmux/Makefile:1.25 src/external/bsd/tmux/usr.bin/tmux/Makefile:1.26 --- src/external/bsd/tmux/usr.bin/tmux/Makefile:1.25 Sun Nov 1 15:16:05 2020 +++ src/external/bsd/tmux/usr.bin/tmux/Makefile Tue Apr 13 04:58:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2020/11/01 15:16:05 christos Exp $ +# $NetBSD: Makefile,v 1.26 2021/04/13 04:58:59 mrg Exp $ .include @@ -227,5 +227,6 @@ DPADD+= ${LIBEVENT} ${LIBTERMINFO} ${LI COPTS.format.c += -Wno-format-nonliteral COPTS.utempter.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.window-copy.c+= ${GCC_NO_MAYBE_UNINITIALIZED} .include Index: src/external/gpl3/binutils/lib/libbfd/Makefile diff -u src/external/gpl3/binutils/lib/libbfd/Makefile:1.22 src/external/gpl3/binutils/lib/libbfd/Makefile:1.23 --- src/external/gpl3/binutils/lib/libbfd/Makefile:1.22 Sat Apr 4 00:46:53 2020 +++ src/external/gpl3/binutils/lib/libbfd/Makefile Tue Apr 13 04:58:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2020/04/04 00:46:53 christos Exp $ +# $NetBSD: Makefile,v 1.23 2021/04/13 04:58:59 mrg Exp $ NOLINKLIB= # defined NOLINT= # defined @@ -45,8 +45,9 @@ CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHI CPPFLAGS.elf.c += -O0 .endif -COPTS.pei-x86_64.c += -Wno-stack-protector -COPTS.elfxx-mips.c += -Wno-stack-protector +COPTS.pei-x86_64.c+= -Wno-stack-protector +
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Tue Apr 13 05:00:06 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Added missing counter clear when a pppoe state changes to PADI_SENT To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/net/if_pppoe.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/net/if_pppoe.c diff -u src/sys/net/if_pppoe.c:1.160 src/sys/net/if_pppoe.c:1.161 --- src/sys/net/if_pppoe.c:1.160 Tue Apr 13 04:57:15 2021 +++ src/sys/net/if_pppoe.c Tue Apr 13 05:00:06 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.160 2021/04/13 04:57:15 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.161 2021/04/13 05:00:06 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.160 2021/04/13 04:57:15 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.161 2021/04/13 05:00:06 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -1547,6 +1547,7 @@ pppoe_timeout(struct pppoe_softc *sc) memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest)); sc->sc_state = PPPOE_STATE_PADI_SENT; + sc->sc_padi_retried = 0; sc->sc_padr_retried = 0; if ((err = pppoe_send_padi(sc)) != 0) { pppoe_printf(sc, @@ -1596,6 +1597,7 @@ pppoe_connect(struct pppoe_softc *sc) ACQUIRE_SPLNET(); /* save state, in case we fail to send PADI */ sc->sc_state = PPPOE_STATE_PADI_SENT; + sc->sc_padi_retried = 0; sc->sc_padr_retried = 0; err = pppoe_send_padi(sc); if (err != 0)
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Tue Apr 13 05:04:54 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Reschedule softint to process packets enqueued to ppoediscinq while doing pppoe_data_input And added a empty check for ppoeinq, for safety To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/net/if_pppoe.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/net/if_pppoe.c diff -u src/sys/net/if_pppoe.c:1.161 src/sys/net/if_pppoe.c:1.162 --- src/sys/net/if_pppoe.c:1.161 Tue Apr 13 05:00:06 2021 +++ src/sys/net/if_pppoe.c Tue Apr 13 05:04:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.161 2021/04/13 05:00:06 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.162 2021/04/13 05:04:54 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.161 2021/04/13 05:00:06 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.162 2021/04/13 05:04:54 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -602,6 +602,9 @@ pppoeintr(void) } } while (disc_done || data_done); + if (!IF_IS_EMPTY(&ppoediscinq) || !IF_IS_EMPTY(&ppoeinq)) + softint_schedule(pppoe_softintr); + SOFTNET_UNLOCK_UNLESS_NET_MPSAFE(); }
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: mrg Date: Tue Apr 13 05:28:16 UTC 2021 Modified Files: src/sys/compat/netbsd32: netbsd32_execve.c Log Message: GCC 10 does not like casting from one identical anonymous enum to another enum. supply some quietening cast. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/compat/netbsd32/netbsd32_execve.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/compat/netbsd32/netbsd32_execve.c diff -u src/sys/compat/netbsd32/netbsd32_execve.c:1.42 src/sys/compat/netbsd32/netbsd32_execve.c:1.43 --- src/sys/compat/netbsd32/netbsd32_execve.c:1.42 Sun Apr 19 20:31:59 2020 +++ src/sys/compat/netbsd32/netbsd32_execve.c Tue Apr 13 05:28:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_execve.c,v 1.42 2020/04/19 20:31:59 thorpej Exp $ */ +/* $NetBSD: netbsd32_execve.c,v 1.43 2021/04/13 05:28:16 mrg Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.42 2020/04/19 20:31:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.43 2021/04/13 05:28:16 mrg Exp $"); #include #include @@ -130,7 +130,7 @@ netbsd32_posix_spawn_fa_alloc(struct pos for (; i < fa->len; i++) { fae = &fa->fae[i]; f32 = &fae32[i]; - fae->fae_action = f32->fae_action; + fae->fae_action = (unsigned)f32->fae_action; fae->fae_fildes = f32->fae_fildes; if (fae->fae_action == FAE_DUP2) fae->fae_data.dup2.newfildes =
CVS commit: src/usr.sbin/rpcbind
Module Name:src Committed By: mrg Date: Tue Apr 13 05:58:45 UTC 2021 Modified Files: src/usr.sbin/rpcbind: rpcb_svc_com.c Log Message: avoid potential uninitialised variable use. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/rpcbind/rpcb_svc_com.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/rpcbind/rpcb_svc_com.c diff -u src/usr.sbin/rpcbind/rpcb_svc_com.c:1.24 src/usr.sbin/rpcbind/rpcb_svc_com.c:1.25 --- src/usr.sbin/rpcbind/rpcb_svc_com.c:1.24 Sun Mar 7 00:23:06 2021 +++ src/usr.sbin/rpcbind/rpcb_svc_com.c Tue Apr 13 05:58:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rpcb_svc_com.c,v 1.24 2021/03/07 00:23:06 christos Exp $ */ +/* $NetBSD: rpcb_svc_com.c,v 1.25 2021/04/13 05:58:45 mrg Exp $ */ /* $FreeBSD: head/usr.sbin/rpcbind/rpcb_svc_com.c 301770 2016-06-09 22:25:00Z pfg $ */ /*- @@ -1275,6 +1275,8 @@ handle_reply(int fd, SVCXPRT *xprt) char *uaddr; #endif + reply_msg.rm_xid = 0; + buffer = malloc(RPC_BUF_MAX); if (buffer == NULL) goto done;
CVS commit: src
Module Name:src Committed By: mrg Date: Tue Apr 13 06:25:49 UTC 2021 Modified Files: src/external/apache2/mDNSResponder/usr.sbin/mdnsd: Makefile src/external/mpl/dhcp/bin/server: Makefile src/sbin/newfs_udf: udf_create.c src/sys/fs/udf: udf_subr.c src/sys/modules/hpacel: Makefile src/usr.bin/rsh: rsh.c Log Message: more GCC 10 fixes. mDNSResponder: another wrong return local address dhcp: ignore a seemingly impossible stringop overflow hpacel: avoid maybe uninitialised error that is wrong. rsh: avoid impossible malloc(0) udf: cast pointers through (uintptr_t) to fool invalid boundary checks To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/bin/server/Makefile cvs rdiff -u -r1.28 -r1.29 src/sbin/newfs_udf/udf_create.c cvs rdiff -u -r1.152 -r1.153 src/sys/fs/udf/udf_subr.c cvs rdiff -u -r1.2 -r1.3 src/sys/modules/hpacel/Makefile cvs rdiff -u -r1.38 -r1.39 src/usr.bin/rsh/rsh.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/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile diff -u src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.13 src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.14 --- src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.13 Sun Sep 6 07:20:26 2020 +++ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile Tue Apr 13 06:25:48 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2020/09/06 07:20:26 mrg Exp $ +# $NetBSD: Makefile,v 1.14 2021/04/13 06:25:48 mrg Exp $ PROG= mdnsd @@ -20,4 +20,6 @@ MAN= mdnsd.8 CWARNFLAGS.clang+= -Wno-unused-value -Wno-error=address-of-packed-member CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER} +COPTS.DNSCommon.c+= ${GCC_NO_RETURN_LOCAL_ADDR} + .include Index: src/external/mpl/dhcp/bin/server/Makefile diff -u src/external/mpl/dhcp/bin/server/Makefile:1.6 src/external/mpl/dhcp/bin/server/Makefile:1.7 --- src/external/mpl/dhcp/bin/server/Makefile:1.6 Sun Jun 7 23:29:16 2020 +++ src/external/mpl/dhcp/bin/server/Makefile Tue Apr 13 06:25:48 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2020/06/07 23:29:16 fox Exp $ +# $NetBSD: Makefile,v 1.7 2021/04/13 06:25:48 mrg Exp $ .include @@ -22,5 +22,6 @@ COPTS.ddns.c +=-Wno-stringop-overflow COPTS.mdb6.c += ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} COPTS.omapi.c += -Wno-stack-protector COPTS.confpars.c+= ${GCC_NO_STRINGOP_TRUNCATION} +COPTS.mdb6.c+= ${GCC_NO_STRINGOP_OVERFLOW} .include Index: src/sbin/newfs_udf/udf_create.c diff -u src/sbin/newfs_udf/udf_create.c:1.28 src/sbin/newfs_udf/udf_create.c:1.29 --- src/sbin/newfs_udf/udf_create.c:1.28 Thu May 14 08:34:18 2020 +++ src/sbin/newfs_udf/udf_create.c Tue Apr 13 06:25:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_create.c,v 1.28 2020/05/14 08:34:18 msaitoh Exp $ */ +/* $NetBSD: udf_create.c,v 1.29 2021/04/13 06:25:48 mrg Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: udf_create.c,v 1.28 2020/05/14 08:34:18 msaitoh Exp $"); +__RCSID("$NetBSD: udf_create.c,v 1.29 2021/04/13 06:25:48 mrg Exp $"); #include #include @@ -2025,7 +2025,7 @@ udf_append_meta_mapping_part_to_efe(stru uint64_t inf_len, obj_size, logblks_rec; uint32_t l_ad, l_ea; uint16_t crclen; - uint8_t *bpos; + uintptr_t bpos; inf_len = udf_rw64(efe->inf_len); obj_size= udf_rw64(efe->obj_size); @@ -2039,8 +2039,8 @@ udf_append_meta_mapping_part_to_efe(stru icb->flags = udf_rw16(UDF_ICB_SHORT_ALLOC); /* append short_ad */ - bpos = (uint8_t *) efe->data + l_ea + l_ad; - memcpy(bpos, mapping, sizeof(struct short_ad)); + bpos = (uintptr_t)efe->data + l_ea + l_ad; + memcpy((void *)bpos, mapping, sizeof(struct short_ad)); l_ad += sizeof(struct short_ad); crclen += sizeof(struct short_ad); Index: src/sys/fs/udf/udf_subr.c diff -u src/sys/fs/udf/udf_subr.c:1.152 src/sys/fs/udf/udf_subr.c:1.153 --- src/sys/fs/udf/udf_subr.c:1.152 Mon Jan 11 22:02:28 2021 +++ src/sys/fs/udf/udf_subr.c Tue Apr 13 06:25:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_subr.c,v 1.152 2021/01/11 22:02:28 skrll Exp $ */ +/* $NetBSD: udf_subr.c,v 1.153 2021/04/13 06:25:49 mrg Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -29,7 +29,7 @@ #include #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.152 2021/01/11 22:02:28 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.153 2021/04/13 06:25:49 mrg Exp $"); #endif /* not lint */ @@ -2664,7 +2664,8 @@ udf_update_vat_extattr_from_lvid(struct const char *extstr = "*UDF VAT LVExtension"; uint64_tvat_uniqueid; uint32_toffset, a_l; - uint8_t*ea_start, *lvextpos; + uint8_t*ea_start; + uintptr_t lvextpos; int error; /* get mountpoint and l
CVS commit: src/external/gpl3/gcc/usr.bin/backend
Module Name:src Committed By: mrg Date: Tue Apr 13 06:30:36 UTC 2021 Modified Files: src/external/gpl3/gcc/usr.bin/backend: Makefile Log Message: more -O0 for vax To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/external/gpl3/gcc/usr.bin/backend/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/backend/Makefile diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.64 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.65 --- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.64 Mon Apr 12 00:05:56 2021 +++ src/external/gpl3/gcc/usr.bin/backend/Makefile Tue Apr 13 06:30:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.64 2021/04/12 00:05:56 mrg Exp $ +# $NetBSD: Makefile,v 1.65 2021/04/13 06:30:36 mrg Exp $ LIBISPRIVATE= yes @@ -552,6 +552,7 @@ COPTS.internal-fn.c+=-O0 COPTS.lto-streamer-out.c+=-O0 COPTS.omp-low.c+=-O0 COPTS.predict.c+=-O0 +COPTS.range-op.cc+=-O0 COPTS.recog.c+=-O0 COPTS.sanopt.c+=-O0 COPTS.stmt.c+=-O0 @@ -591,8 +592,8 @@ COPTS.ubsan.c+=-O0 COPTS.varasm.c+=-O0 COPTS.vr-values.c+=-O0 COPTS.web.c+=-O0 -COPTS.wide-int.cc+=-O0 COPTS.wide-int-range.cc+=-O0 +COPTS.wide-int.cc+=-O0 .else COPTS.tree.c= ${${ACTIVE_CC} == "clang" :? -O0 :} .endif