https://gcc.gnu.org/g:255262a2242cc1d51db2b1b56f824400820f4992
commit r17-1739-g255262a2242cc1d51db2b1b56f824400820f4992 Author: Filip Kastl <[email protected]> Date: Sat Jun 20 11:49:15 2026 +0200 fixincl.c: const char * -> char * and remove trailing whitespace This patch removes the const keyword from the second parameter of extract_quoted_files. The function actually does modify the string passed through that parameter. Moreover, clang currently produces a warning when compiling this file since in C23, strrchr of a const char * returns const char *. This patch gets rid of that warning. I've also stumbled upon some trailing whitespace so I removed that too. Bootstrapped and regtested on x86_64 linux. I would push this as trivial, but this is the first time I'm modifying fixincludes, so I'm trying to be careful. fixincludes/ChangeLog: * fixincl.c (cksum_test): Remove trailing whitespace. (quoted_file_exists): Remove trailing whitespace. (extract_quoted_files): const char * -> char *. (fix_with_system): Remove trailing whitespace. Signed-off-by: Filip Kastl <[email protected]> Diff: --- fixincludes/fixincl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c index 4260024519f3..2c36a9a30d18 100644 --- a/fixincludes/fixincl.c +++ b/fixincludes/fixincl.c @@ -650,7 +650,7 @@ cksum_test (char * pz_data, tTestDesc * p_test, char * fname) char * fnm = strrchr(fname, '/'); if (fnm != NULL) fname = fnm + 1; - + errno = 0; cksum = (unsigned int)strtoul(p_test->pz_test_text, &fnm, 10); if (errno != 0) @@ -691,7 +691,7 @@ cksum_test (char * pz_data, tTestDesc * p_test, char * fname) static int quoted_file_exists (const char* pz_src_path, - const char* pz_file_path, + const char* pz_file_path, const char* pz_file) { char z[ MAXPATHLEN ]; @@ -740,8 +740,8 @@ quoted_file_exists (const char* pz_src_path, static void -extract_quoted_files (char* pz_data, - const char* pz_fixed_file, +extract_quoted_files (char* pz_data, + char* pz_fixed_file, regmatch_t* p_re_match) { char *pz_dir_end = strrchr (pz_fixed_file, '/'); @@ -941,7 +941,7 @@ fix_with_system (tFixDesc* p_fixd, argsize = sizeof( z_cmd_fmt ) + strlen( pz_temp_file ) + strlen( pz_file_source ); parg_size = argsize; - + if (p_fixd->fd_flags & FD_SHELL_SCRIPT) { argsize += strlen( z_subshell_start ) + strlen ( z_subshell_end );
