In file included from object.c:40:0:
authorJay Krell <jaykrell@microsoft.com>
Thu, 13 Jun 2019 08:58:12 +0000 (01:58 -0700)
committerLarry Ewing <lewing@microsoft.com>
Tue, 18 Jun 2019 02:53:08 +0000 (21:53 -0500)
object.c: In function 'mono_class_proxy_vtable':
../../mono/metadata/profiler-private.h:191:4: warning: 'pvt' may be used uninitialized in this function [-Wmaybe-uninitialized]
    mono_profiler_raise_ ## name args; \
    ^~~~~~~~~~~~~~~~~~~~
object.c:2338:19: note: 'pvt' was declared here
  MonoVTable *vt, *pvt;
                   ^~~

Commit migrated from https://github.com/mono/mono/commit/452209414ea9f9863758e63c4d0307572e45f755

src/mono/mono/metadata/object.c

index 184854e..42e78ad 100644 (file)
@@ -2335,7 +2335,7 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
-       MonoVTable *vt, *pvt;
+       MonoVTable *vt, *pvt = NULL;
        int i, j, vtsize, extra_interface_vtsize = 0;
        guint32 max_interface_id;
        MonoClass *k;