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] Add "const" to a few locals in gdb


*** TEST RESULTS FOR COMMIT b5a9bfbebec0a42d3c5b4fe3b7a62bd31cecc440 ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: b5a9bfbebec0a42d3c5b4fe3b7a62bd31cecc440

Add "const" to a few locals in gdb

I noticed that some code in gdb was doing:

    char *mumble = getenv (...)

However, using "const char *" here would be clearer.
This patch fixes the instances I could readily build.

Tested by rebuilding.

gdb/ChangeLog
2018-09-24  Tom Tromey  <tom@tromey.com>

	* common/pathstuff.c (get_standard_cache_dir): Make
	"xdg_cache_home" and "home" const.
	* top.c (init_history): Make "tmpenv" const.
	* main.c (get_init_files): Make "homedir" const.


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