Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/csh bin/csh: Fix the -Wclobber warning.
details: https://anonhg.NetBSD.org/src/rev/463aea74bf4f
branches: trunk
changeset: 969039:463aea74bf4f
user: fox <fox%NetBSD.org@localhost>
date: Wed Feb 05 20:06:17 2020 +0000
description:
bin/csh: Fix the -Wclobber warning.
Mark the variable as volatile as it can be clobbered when a vfork occurs.
Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.
Reviewed by: kamil@
diffstat:
bin/csh/sem.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 6b48fd7a101a -r 463aea74bf4f bin/csh/sem.c
--- a/bin/csh/sem.c Wed Feb 05 17:13:24 2020 +0000
+++ b/bin/csh/sem.c Wed Feb 05 20:06:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.31 2019/01/05 16:54:00 christos Exp $ */
+/* $NetBSD: sem.c,v 1.32 2020/02/05 20:06:17 fox Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)sem.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: sem.c,v 1.31 2019/01/05 16:54:00 christos Exp $");
+__RCSID("$NetBSD: sem.c,v 1.32 2020/02/05 20:06:17 fox Exp $");
#endif
#endif /* not lint */
@@ -67,7 +67,7 @@
struct biltins * volatile bifunc;
int pv[2], pid;
sigset_t nsigset;
- int forked;
+ volatile int forked;
UNREGISTER(forked);
UNREGISTER(bifunc);
Home |
Main Index |
Thread Index |
Old Index