From 977a0f81d1e7dcd746fb22b3f972578e996e86d3 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 3 May 2017 14:39:28 +0200 Subject: geoip: adjust geoip{4,6}_{city,region}_name prototypes for !HAVE_GEOIP Make the return type make the functions for HAVE_GEOIP. This fixes GCC's -Wdiscarded-qualifiers warnings when building without geoip support. Fixes: 8fd19eefa46b ("geoip: Fix memory leak when using GeoIPRecord") Signed-off-by: Tobias Klauser --- geoip.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'geoip.h') diff --git a/geoip.h b/geoip.h index cdeef19..b1e2bb5 100644 --- a/geoip.h +++ b/geoip.h @@ -45,22 +45,22 @@ static inline int geoip_working(void) return 0; } -static inline const char *geoip4_city_name(struct sockaddr_in *sa) +static inline char *geoip4_city_name(struct sockaddr_in *sa) { return NULL; } -static inline const char *geoip6_city_name(struct sockaddr_in6 *sa) +static inline char *geoip6_city_name(struct sockaddr_in6 *sa) { return NULL; } -static inline const char *geoip4_region_name(struct sockaddr_in *sa) +static inline char *geoip4_region_name(struct sockaddr_in *sa) { return NULL; } -static inline const char *geoip6_region_name(struct sockaddr_in6 *sa) +static inline char *geoip6_region_name(struct sockaddr_in6 *sa) { return NULL; } -- cgit v1.2.3-54-g00ecf