]> granicus.if.org Git - gc/commitdiff
Eliminate 'variable might be uninitialized' warning in win32_start_inner
authorIvan Maidanski <ivmai@mail.ru>
Mon, 18 Jun 2018 21:59:23 +0000 (00:59 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 17 Jul 2018 06:04:50 +0000 (09:04 +0300)
* win32_threads.c [!__GNUC__] (GC_win32_start_inner): Initialize ret
local variable (to null) before try-finally block; add comment.

win32_threads.c

index 86cd1c98ed21eb57410083858ed727a838ec39d1..fa55288d3f76b0859805a817e429fa483a3dc8f6 100644 (file)
@@ -2133,6 +2133,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
     /* This is probably pointless, since an uncaught exception is       */
     /* supposed to result in the process being killed.                  */
 #   ifndef __GNUC__
+      ret = NULL; /* to suppress "might be uninitialized" compiler warning */
       __try
 #   endif
     {