This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] -Wwrite-strings: Constify macroexp.c:init_shared_buffer


*** 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]