From 146c4b701696cb54e9e5ad4668e3ad88743c546e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Wed, 30 Dec 2015 07:45:35 +0000 Subject: uat: Fix warnings [-Wcast-qual] uat_fld_tostr_cb_t callback *out_ptr argument is g_mallocated and is to be freed by the caller so drop constness requirement to fix the corresponding g_free warnings. Change-Id: I1be25fa3e2f54fb32058ac0b5c1631b193b07701 Reviewed-on: https://code.wireshark.org/review/12943 Reviewed-by: Guy Harris --- epan/uat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/uat.c') diff --git a/epan/uat.c b/epan/uat.c index 0301d0cde5..c0a4570a12 100644 --- a/epan/uat.c +++ b/epan/uat.c @@ -250,7 +250,7 @@ uat_t* uat_get_table_by_name(const char* name) { static void putfld(FILE* fp, void* rec, uat_field_t* f) { guint fld_len; - const char* fld_ptr; + char* fld_ptr; f->cb.tostr(rec,&fld_ptr,&fld_len,f->cbdata.tostr,f->fld_data); @@ -290,7 +290,7 @@ static void putfld(FILE* fp, void* rec, uat_field_t* f) { g_assert_not_reached(); } - g_free((char*)fld_ptr); + g_free(fld_ptr); } gboolean uat_save(uat_t* uat, char** error) { -- cgit v1.2.1