From 4acdfe3e63ee9af54cc766a6698c81283f46685c Mon Sep 17 00:00:00 2001 From: AndersBroman Date: Sat, 22 Mar 2014 11:32:25 +0100 Subject: [PATCH] Fix request for implicit conversion from 'gpointer' to 'struct file_priv_t *' not permitted in C++ Change-Id: If88c65fa70d38d6b447a060a19d2681aa7166217 Reviewed-on: https://code.wireshark.org/review/783 Reviewed-by: Anders Broman --- epan/wslua/wslua_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epan/wslua/wslua_file.c b/epan/wslua/wslua_file.c index 5c419045c6..0fcc55f5e0 100644 --- a/epan/wslua/wslua_file.c +++ b/epan/wslua/wslua_file.c @@ -511,7 +511,7 @@ typedef struct _file_priv_t { /* create and set the wtap->priv private data for the file instance */ static void create_wth_priv(lua_State* L, wtap *wth) { - file_priv_t *priv = g_malloc(sizeof(file_priv_t)); + file_priv_t *priv = (file_priv_t*)g_malloc(sizeof(file_priv_t)); if (wth->priv != NULL) { luaL_error(L, "Cannot create wtap private data because there already is private data"); @@ -587,7 +587,7 @@ static void remove_wth_priv(lua_State* L, wtap *wth) { /* create and set the wtap_dumper->priv private data for the file instance */ static void create_wdh_priv(lua_State* L, wtap_dumper *wdh) { - file_priv_t *priv = g_malloc(sizeof(file_priv_t)); + file_priv_t *priv = (file_priv_t*)g_malloc(sizeof(file_priv_t)); if (wdh->priv != NULL) { luaL_error(L, "Cannot create wtap_dumper private data because there already is private data");