build: remove warn_unused_result errors
authorSpencer Oliver <ntfreak@users.sourceforge.net>
Tue, 5 Oct 2010 15:29:37 +0000 (16:29 +0100)
committerSpencer Oliver <ntfreak@users.sourceforge.net>
Tue, 5 Oct 2010 15:29:37 +0000 (16:29 +0100)
Remove any build errors for strtol when building release
version of openocd.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
src/server/gdb_server.c
src/server/server.c

index 74dec63..222af47 100644 (file)
@@ -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)
index 01d91d3..1feb744 100644 (file)
@@ -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;