Module Name: src Committed By: fox Date: Wed Feb 5 20:06:17 UTC 2020
Modified Files: src/bin/csh: sem.c Log Message: 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@ To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/bin/csh/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/bin/csh/sem.c diff -u src/bin/csh/sem.c:1.31 src/bin/csh/sem.c:1.32 --- src/bin/csh/sem.c:1.31 Sat Jan 5 16:54:00 2019 +++ src/bin/csh/sem.c Wed Feb 5 20:06:17 2020 @@ -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 @@ execute(struct command *t, int wtty, int struct biltins * volatile bifunc; int pv[2], pid; sigset_t nsigset; - int forked; + volatile int forked; UNREGISTER(forked); UNREGISTER(bifunc);