diff options
author | Erhan Kurubas <erhan.kurubas@espressif.com> | 2023-04-02 00:26:51 +0200 |
---|---|---|
committer | Erhan Kurubas <erhan.kurubas@espressif.com> | 2023-07-20 23:09:06 +0200 |
commit | e6f30aef80c952b9b60a3e8364f645b7fa287d58 (patch) | |
tree | 9e7aa8ca85f1bf57577c6d5eadab13101ce639e7 /src/server/gdb_server.c | |
parent | 1a089d8409f159552a35a4ed9e5205586f076a05 (diff) | |
download | riscv-openocd-e6f30aef80c952b9b60a3e8364f645b7fa287d58.zip riscv-openocd-e6f30aef80c952b9b60a3e8364f645b7fa287d58.tar.gz riscv-openocd-e6f30aef80c952b9b60a3e8364f645b7fa287d58.tar.bz2 |
src: fix clang15 compiler warnings
Below warnings are fixed.
1- A function declaration without a prototype is deprecated in all
versions of C [-Werror,-Wstrict-prototypes]
2- error: variable set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I1cf14b8e5e3e732ebc9cacc4b1cb9009276a8ea9
Reviewed-on: https://review.openocd.org/c/openocd/+/7569
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Diffstat (limited to 'src/server/gdb_server.c')
-rw-r--r-- | src/server/gdb_server.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 8360ee1..41a47bf 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -3012,7 +3012,8 @@ static int gdb_query_packet(struct connection *connection, return ERROR_OK; } -static bool gdb_handle_vcont_packet(struct connection *connection, const char *packet, int packet_size) +static bool gdb_handle_vcont_packet(struct connection *connection, const char *packet, + __attribute__((unused)) int packet_size) { struct gdb_connection *gdb_connection = connection->priv; struct target *target = get_available_target_from_connection(connection); @@ -3031,7 +3032,6 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p if (parse[0] == ';') { ++parse; - --packet_size; } /* simple case, a continue packet */ @@ -3070,14 +3070,11 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p int current_pc = 1; int64_t thread_id; parse++; - packet_size--; if (parse[0] == ':') { char *endp; parse++; - packet_size--; thread_id = strtoll(parse, &endp, 16); if (endp) { - packet_size -= endp - parse; parse = endp; } } else { @@ -3115,7 +3112,6 @@ static bool gdb_handle_vcont_packet(struct connection *connection, const char *p if (parse[0] == ';') { ++parse; - --packet_size; if (parse[0] == 'c') { parse += 1; |