aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorLiviu Ionescu <ilg@livius.net>2017-08-25 14:53:45 +0300
committerLiviu Ionescu <ilg@livius.net>2017-08-25 14:53:45 +0300
commitb42bc76e2ebe1525895440ffccffa59b5921cda2 (patch)
treefe7224c506af8f8443e16eaa19e0ac6ecfcadfca /src/server
parent66806aa70dc1e69de748e28c618dd15b1d569ee0 (diff)
downloadriscv-openocd-b42bc76e2ebe1525895440ffccffa59b5921cda2.zip
riscv-openocd-b42bc76e2ebe1525895440ffccffa59b5921cda2.tar.gz
riscv-openocd-b42bc76e2ebe1525895440ffccffa59b5921cda2.tar.bz2
server.c: fix clang warning
/Users/ilg/Work/openocd/openocd.git/src/server/server.c:305:22: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'struct sockaddr *' [-Werror,-Wincompatible-pointer-types] getsockname(c->fd, &addr_in, &addr_in_size); ^~~~~~~~ /usr/include/sys/socket.h:687:50: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict)
Diffstat (limited to 'src/server')
-rw-r--r--src/server/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/server.c b/src/server/server.c
index 99bdc35..f3ae34e 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -302,7 +302,7 @@ int add_service(char *name,
struct sockaddr_in addr_in;
socklen_t addr_in_size = sizeof(addr_in);
- getsockname(c->fd, &addr_in, &addr_in_size);
+ getsockname(c->fd, (struct sockaddr *)&addr_in, &addr_in_size);
LOG_INFO("Listening on port %d for %s connections",
ntohs(addr_in.sin_port), name);
} else if (c->type == CONNECTION_STDINOUT) {