Skip to content

Commit

Permalink
slirp: fix compilation errors with DEBUG set
Browse files Browse the repository at this point in the history
slirp/slirp.c: In function 'get_dns_addr_resolv_conf':
slirp/slirp.c:202:29: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
                 char *res = inet_ntop(af, tmp_addr, s, sizeof(s));
                             ^~~~~~~~~
slirp/slirp.c:204:25: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
                     res = "(string conversion error)";

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
  • Loading branch information
vivier authored and sthibaul committed Mar 28, 2017
1 parent df90463 commit 51149a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slirp/slirp.c
Expand Up @@ -198,7 +198,7 @@ static int get_dns_addr_resolv_conf(int af, void *pdns_addr, void *cached_addr,
#ifdef DEBUG
else {
char s[INET6_ADDRSTRLEN];
char *res = inet_ntop(af, tmp_addr, s, sizeof(s));
const char *res = inet_ntop(af, tmp_addr, s, sizeof(s));
if (!res) {
res = "(string conversion error)";
}
Expand Down

0 comments on commit 51149a2

Please sign in to comment.