This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] -Wwrite-strings: Constify macroexp.c:init_shared_buffer
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 05 Aug 2017 09:44:45 -0400
- Subject: [binutils-gdb] -Wwrite-strings: Constify macroexp.c:init_shared_buffer
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT b38ef47f47bda5509babd768092ceb09ab98828d ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: b38ef47f47bda5509babd768092ceb09ab98828d
-Wwrite-strings: Constify macroexp.c:init_shared_buffer
There's one call in the file that passes a string literal, like:
init_shared_buffer (&va_arg_name, "__VA_ARGS__",
strlen ("__VA_ARGS__"));
Instead of adding a cast here, make init_shared_buffer take a 'const
char *', and remove the several casts in the file that are made
obsolete.
gdb/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* macroexp.c (macro_buffer::shared): Now a bool.
(init_buffer): Update.
(init_shared_buffer): Constify 'addr' parameter.
(substitute_args, expand, macro_expand, macro_expand_next): Remove
casts.