diff options
author | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:35 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:35 +0100 |
commit | fb32b4f7005ef8f1bde02394b58b5c5eda9cbf10 (patch) | |
tree | a8de4f50124a206aa18acc2a3a9ff496de38301e /gdb/gdbserver/remote-utils.c | |
parent | fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45 (diff) | |
download | binutils-fb32b4f7005ef8f1bde02394b58b5c5eda9cbf10.zip binutils-fb32b4f7005ef8f1bde02394b58b5c5eda9cbf10.tar.gz binutils-fb32b4f7005ef8f1bde02394b58b5c5eda9cbf10.tar.bz2 |
-Wwrite-strings: gdbserver's 'port' parsing
-Wwrite-strings flags this assignment as requiring a cast:
port = STDIO_CONNECTION_NAME;
because 'port' is a "char *", and STDIO_CONNECTION_NAME is a string
literal.
gdb/gdbserver/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* remote-utils.c (remote_prepare, remote_open): Constify.
* remote-utils.h (remote_prepare, remote_open): Constify.
* server.c (captured_main): Constify 'port' handling.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 6a2cc04..37a6402 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -217,9 +217,9 @@ handle_accept_event (int err, gdb_client_data client_data) NAME is the filename used for communication. */ void -remote_prepare (char *name) +remote_prepare (const char *name) { - char *port_str; + const char *port_str; #ifdef USE_WIN32API static int winsock_initialized; #endif @@ -284,9 +284,9 @@ remote_prepare (char *name) NAME is the filename used for communication. */ void -remote_open (char *name) +remote_open (const char *name) { - char *port_str; + const char *port_str; port_str = strchr (name, ':'); #ifdef USE_WIN32API |