diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-12-30 07:45:35 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-31 22:56:34 +0000 |
commit | 146c4b701696cb54e9e5ad4668e3ad88743c546e (patch) | |
tree | bcf117678f9def35304e63d0843dc46889199962 /ui/qt | |
parent | c14df7f7a80b3650eff08e46c9fbfbd522b435dc (diff) |
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 <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/uat_dialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/qt/uat_dialog.cpp b/ui/qt/uat_dialog.cpp index d6a7b8a4d6..6bb89f763f 100644 --- a/ui/qt/uat_dialog.cpp +++ b/ui/qt/uat_dialog.cpp @@ -162,8 +162,8 @@ QString UatDialog::fieldString(guint row, guint column) void *rec = UAT_INDEX_PTR(uat_, row); uat_field_t *field = &uat_->fields[column]; - guint length; - const char *str; + guint length; + char *str; field->cb.tostr(rec, &str, &length, field->cbdata.tostr, field->fld_data); @@ -189,7 +189,7 @@ QString UatDialog::fieldString(guint row, guint column) break; } - g_free((char*)str); + g_free(str); return string_rep; } @@ -497,10 +497,10 @@ void UatDialog::addRecord(bool copy_from_current) switch (field->mode) { case PT_TXTMOD_ENUM: guint length; - const char *str; + char *str; field->cb.tostr(rec, &str, &length, field->cbdata.tostr, field->fld_data); field->cb.set(rec, str, length, field->cbdata.set, field->fld_data); - g_free((char*)str); + g_free(str); break; case PT_TXTMOD_NONE: break; |