From 5e6d45ca98bb8c368b73084785d90fa3b0b6291f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Fri, 27 Nov 2015 23:04:16 +0000 Subject: Make address_to_display() use proper (non-)constness Don't return allocated memory as a const pointer. Fixes multiple [-Wcast-qual] warnings. Change-Id: Ie9ceac27fa2a5eba41a5392ac983ff28c3939239 Reviewed-on: https://code.wireshark.org/review/12267 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/address_types.c | 2 +- epan/to_str.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'epan') diff --git a/epan/address_types.c b/epan/address_types.c index 29fca975f1..e84be71ad6 100644 --- a/epan/address_types.c +++ b/epan/address_types.c @@ -961,7 +961,7 @@ address_to_name(const address *addr) } } -const gchar * +gchar * address_to_display(wmem_allocator_t *allocator, const address *addr) { gchar *str = NULL; diff --git a/epan/to_str.h b/epan/to_str.h index 7475b0c672..d6ecde434c 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -80,7 +80,7 @@ const gchar *address_to_name(const address *addr); * e.g. "10.10.10.10" for IPv4 address 10.10.10.10. */ WS_DLL_PUBLIC -const gchar *address_to_display(wmem_allocator_t *allocator, const address *addr); +gchar *address_to_display(wmem_allocator_t *allocator, const address *addr); WS_DLL_PUBLIC void address_to_str_buf(const address *addr, gchar *buf, int buf_len); -- cgit v1.2.3