[PATCH] Remove call to reset from compile_to_object

Tom Tromey tom@tromey.com
Sat Jan 23 19:27:53 GMT 2021


>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> compile_to_object declares 'error_message' and then immediately calls
Tom> reset on it.  It seemed better to change it to use initialization
Tom> instead; and then I noticed that set_arguments could return a
Tom> unique_xmalloc_ptr<char> itself.

Tom> gdb/ChangeLog
Tom> 2021-01-16  Tom Tromey  <tom@tromey.com>

Tom> 	* compile/compile-internal.h (class compile_instance)
Tom> 	<set_arguments>: Change return type.
Tom> 	* compile/compile.c (compile_to_object): Remove call to reset.
Tom> 	(compile_instance::set_arguments): Change return type.

I'm going to check this in.

Tom


More information about the Gdb-patches mailing list