From 3e515067981fc584b8da04bb40c8a1eba2c3f251 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 26 Aug 2016 09:49:30 +0300 Subject: [PATCH] Eliminate 'value stored is never read' warning of Clang static analyzer * tools/setjmp_t.c (g): Declare (before "main"). * tools/setjmp_t.c (main): Call g(x) to use "x" variable value after x=2. --- tools/setjmp_t.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/setjmp_t.c b/tools/setjmp_t.c index e66d7f60..9ba9d285 100644 --- a/tools/setjmp_t.c +++ b/tools/setjmp_t.c @@ -67,6 +67,8 @@ int * nested_sp(void) return (int *)sp; } +int g(int x); + int main(void) { volatile word sp; @@ -136,6 +138,7 @@ int main(void) # ifdef PARALLEL_MARK printf("Parallel marking enabled.\n"); # endif + (void)g(x); return(0); } -- 2.40.0