]> granicus.if.org Git - gc/commitdiff
Eliminate 'value stored is never read' warning of Clang static analyzer
authorIvan Maidanski <ivmai@mail.ru>
Fri, 26 Aug 2016 06:49:30 +0000 (09:49 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 8 Nov 2016 20:40:29 +0000 (23:40 +0300)
* 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

index 328cd92f697b6cbc836baec7226c38505a7004eb..873cc1f27f423aaf209ee8fac387412a8f85dd3a 100644 (file)
@@ -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);
 }