This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] -Wwrite-strings: MI -info-os
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 05 Apr 2017 18:55:23 -0400
- Subject: [binutils-gdb] -Wwrite-strings: MI -info-os
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45 ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45
-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.