diff options
author | Jan Matyas <jan.matyas@codasip.com> | 2024-09-30 14:55:58 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2024-10-20 09:25:25 +0000 |
commit | d09ff476446a5403e556476b41a5a3c9bdf0a706 (patch) | |
tree | 3cbe73ae651df3ab64ae2902129b00bdfb6c8a63 /git-hooks/commit-msg | |
parent | 114ca19f64d8af5365ecf171cc2adc45a763a406 (diff) | |
download | riscv-openocd-d09ff476446a5403e556476b41a5a3c9bdf0a706.zip riscv-openocd-d09ff476446a5403e556476b41a5a3c9bdf0a706.tar.gz riscv-openocd-d09ff476446a5403e556476b41a5a3c9bdf0a706.tar.bz2 |
gdb_server: Improve const correctness
On several packet-handling functions, add "const" to arguments
that represent read-only packet buffers.
For instance on GCC 13.2.0, this code:
const char *some_packet = "...";
gdb_put_packet(conn, some_packet, strlen(some_packet));
would prior to the fix produce warning:
passing argument 2 of ‘gdb_put_packet’ discards ‘const’
qualifier from pointer target type [-Wdiscarded-qualifiers]
Change-Id: Idb62f57d37ed323c39de38982e57afdd3882e280
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8517
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Diffstat (limited to 'git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions