git: 684dd563d105 - stable/13 - stand: Fix set but unused warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:11:25 UTC
The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=684dd563d1058af84e6f503b0aa9e954760ae30f commit 684dd563d1058af84e6f503b0aa9e954760ae30f Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-07-26 04:48:31 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-01-24 21:49:27 +0000 stand: Fix set but unused warning Make interp_identifier global to avoid a set but not used warning. For a global, llvm can't optimize it out (yet?) Sponsored by: Netflix (cherry picked from commit f4d71d0c1a9976c047758e065adb2c1498cd9765) --- stand/common/interp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/common/interp.c b/stand/common/interp.c index ab68694d61b7..de5ea55eab41 100644 --- a/stand/common/interp.c +++ b/stand/common/interp.c @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #define MAXARGS 20 /* maximum number of arguments allowed */ +const char * volatile interp_identifier; + /* * Interactive mode */ @@ -46,7 +48,6 @@ void interact(void) { static char input[256]; /* big enough? */ - const char * volatile interp_identifier; TSENTER();