interp/interp.c: In function 'interp_entry.constprop':
authorJay Krell <jaykrell@microsoft.com>
Thu, 13 Jun 2019 08:54:40 +0000 (01:54 -0700)
committerLarry Ewing <lewing@microsoft.com>
Tue, 18 Jun 2019 02:53:08 +0000 (21:53 -0500)
interp/interp.c:1847:3: warning: 'orig_domain' may be used uninitialized in this function [-Wmaybe-uninitialized]
   mono_threads_detach_coop (orig_domain, &attach_cookie);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Commit migrated from https://github.com/mono/mono/commit/457d0f02c5a39c268394f09d8f545db6123d4ae7

src/mono/mono/mini/interp/interp.c

index e097c13..d346b42 100644 (file)
@@ -1769,7 +1769,7 @@ interp_entry (InterpEntryData *data)
        MonoMethod *method;
        MonoMethodSignature *sig;
        MonoType *type;
-       gpointer orig_domain, attach_cookie;
+       gpointer orig_domain = NULL, attach_cookie;
        int i;
 
        if ((gsize)data->rmethod & 1) {