From: Ivan Maidanski Date: Fri, 26 Aug 2016 06:49:30 +0000 (+0300) Subject: Eliminate 'value stored is never read' warning of Clang static analyzer X-Git-Tag: v8.0.0~1163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e515067981fc584b8da04bb40c8a1eba2c3f251;p=gc 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. --- 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); }