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 | fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45 (patch) | |
tree | 4d8f7801d7622567325071d380d1467629695c77 /gdb/mi | |
parent | 9f33b8b7c19413efbb37638bdba54706e4da8573 (diff) | |
download | gdb-fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45.zip gdb-fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45.tar.gz gdb-fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45.tar.bz2 |
-Wwrite-strings: MI -info-os
-Wwrite-strings flags this attempt to convert a string literal to
"char *":
info_osdata_command ("", 0);
info_osdata_command is a command function. We could address this by
simply passing NULL instead of "". However, I went a little bit
further and added a new function that is called by both the CLI and
MI.
gdb/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
info_osdata_command.
* osdata.c (info_osdata_command): Rename to ...
(info_osdata): ... this. Constify 'type' parameter, and remove
the 'from_tty' parameter. Accept NULL TYPE.
(info_osdata_command): New function.
* osdata.h (info_osdata_command): Remove declaration.
(info_osdata): New declaration.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mi/mi-cmd-info.c b/gdb/mi/mi-cmd-info.c index eba1ca2..1a96d6f 100644 --- a/gdb/mi/mi-cmd-info.c +++ b/gdb/mi/mi-cmd-info.c @@ -106,10 +106,10 @@ mi_cmd_info_os (const char *command, char **argv, int argc) switch (argc) { case 0: - info_osdata_command ("", 0); + info_osdata (NULL); break; case 1: - info_osdata_command (argv[0], 0); + info_osdata (argv[0]); break; default: error (_("Usage: -info-os [INFOTYPE]")); |