From 6229e438dd548ae75f9d26e2ea8cbf070ce27e5f Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Tue, 5 Oct 2010 16:29:37 +0100 Subject: [PATCH] build: remove warn_unused_result errors Remove any build errors for strtol when building release version of openocd. Signed-off-by: Spencer Oliver --- src/server/gdb_server.c | 2 +- src/server/server.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 74dec63c..222af47a 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2410,7 +2410,7 @@ static int gdb_target_add_one(struct target *target) * then we increment the port number for the next target. */ char *end; - strtol(gdb_port_next, &end, 0); + portnumber = strtol(gdb_port_next, &end, 0); if (!*end) { if (parse_long(gdb_port_next, &portnumber) == ERROR_OK) diff --git a/src/server/server.c b/src/server/server.c index 01d91d30..1feb744b 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -200,7 +200,7 @@ int add_service(char *name, const char *port, int max_connections, new_connectio } else { char *end; - strtol(c->port, &end, 0); + portnumber = strtol(c->port, &end, 0); if (!*end && (parse_long(c->port, &portnumber) == ERROR_OK)) { c->portnumber = portnumber; -- 2.39.5