openocd/src/helper
Antonio Borneo a70bab9e51 helper: fix build with mingw gcc 12.1.0
New mingw compiler correctly complains for using a freed memory
area:

	src/helper/configuration.c: In function 'get_home_dir':
	src/helper/configuration.c:182:29: error: dangling pointer 'home'
		to 'homepath' may be used [-Werror=dangling-pointer=]
	182 | home_path = alloc_printf("%s/%s", home, append_path);
	    |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In fact the variable 'homepath' is declared inside an 'if' branch
and is not available outside.

Move the declaration of 'homepath' to have it available in a wider
context.

Change-Id: I4a43a03c007c9f0d5c4cee962a9f7cc83ca49637
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Dietmar May <dietmar.may@outlook.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7038
Tested-by: jenkins
Reviewed-by: Dietmar May <dietmar.may@outlook.com>
2022-06-24 21:54:46 +00:00
..
align.h helper: add align.h 2021-08-14 13:29:43 +01:00
bin2char.sh helper: fix minor typos 2020-09-05 17:10:54 +01:00
binarybuffer.c openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
binarybuffer.h Fix debug prints when loading to flash 2020-09-05 16:48:08 +01:00
bits.h helper/bits: add BIT_ULL and GENMASK macros 2022-03-26 13:35:55 +00:00
command.c openocd: add keep_alive during command sleep 2021-12-18 17:23:34 +00:00
command.h command: document enum command_mode 2021-10-25 16:10:28 +00:00
configuration.c helper: fix build with mingw gcc 12.1.0 2022-06-24 21:54:46 +00:00
configuration.h helper/configuration: free script_search_dirs and config_file_names 2018-03-07 23:47:31 +00:00
fileio.c openocd: manually remove NULL comparisons 2021-07-24 10:38:19 +01:00
fileio.h Cleanup of config/includes. 2021-05-01 14:35:09 +01:00
jep106.c jep106: use packed jedec manufacturer code 2021-08-22 20:26:06 +00:00
jep106.h jep106: use packed jedec manufacturer code 2021-08-22 20:26:06 +00:00
jep106.inc jep106.inc: Update to revision JEP106BC 2021-09-18 15:27:31 +00:00
jim-nvp.c openocd: include config.h in every file .c 2022-03-26 13:32:57 +00:00
jim-nvp.h helper/jim-nvp: comply with coding style [1/2] 2021-06-04 17:40:39 +01:00
list.h helper/list: add list_for_each_entry_direction() 2022-02-14 15:10:41 +00:00
log.c keep-alive: drop link with log framework 2022-03-19 09:10:39 +00:00
log.h log: fix memory leak when log to file is enabled 2022-01-22 10:15:48 +00:00
Makefile.am Makefile: drop warning suppression on win build 2021-08-30 13:52:12 +00:00
options.c openocd: fix simple cases of NULL comparison 2021-07-24 10:37:49 +01:00
replacements.c helper: remove fix for libusb pre-v1.0.9 2021-08-30 13:51:46 +00:00
replacements.h helper: remove fix for libusb pre-v1.0.9 2021-08-30 13:51:46 +00:00
startup.tcl openocd: add post-init and pre-shutdown helpers 2022-05-14 08:58:36 +00:00
system.h Cleanup of config/includes. 2021-05-01 14:35:09 +01:00
time_support_common.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
time_support.c openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
time_support.h openocd: fix some minor typo 2021-05-22 10:06:51 +01:00
types.h helper/types: remove type '_Bool' 2021-05-01 13:36:58 +01:00
update_jep106.pl helper: fix minor typos 2020-09-05 17:10:54 +01:00
util.c helper: rename camelcase symbols 2021-07-02 17:10:03 +01:00
util.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00