Remove warnings (#1140)

* remove warnings on windows with vs2019.

* remove warnings.

Backports commit ca6516ff790f2c6b2bc59a6b7472cb25be0f82b8 from unicorn.
This commit is contained in:
Chen Huitao 2020-01-14 09:05:34 -05:00 committed by Lioncash
parent bcef414231
commit 00ffa5c930

View file

@ -1265,7 +1265,7 @@ static inline guint g_hash_table_lookup_node_for_insertion (GHashTable *hash_
GHashNode *node;
guint node_index;
guint hash_value;
guint first_tombstone;
guint first_tombstone = 0;
gboolean have_tombstone = FALSE;
guint step = 0;
@ -2126,7 +2126,10 @@ char *g_strdup_vprintf(const char *format, va_list ap)
return NULL;
vsnprintf(str_res, len+1, format, ap);
#else
vasprintf(&str_res, format, ap);
int ret = vasprintf(&str_res, format, ap);
if (ret == -1) {
return NULL;
}
#endif
return str_res;
}