When I compile with GCC15, I now run into error with print_help() due to mismatched number of parameters with the following invocation:
cde/lib/tt/bin/ttauth/ttauth.c
103: print_help (stderr, NULL, " "); /* match prefix indentation */
Upon closer look, I can find that print_help() only takes 2 parameters intead of 3, that is:
cde/lib/tt/bin/ttauth/process.c
974:print_help(FILE *fp, const char *cmd)
1004: n = print_help (stdout, cmd);
I dig further with git blame to when such changes were made and found out it was part of initial import of 2.1.30 from the Open Group:
git show 83b6996da | grep print_help
+int print_help (fp, cmd)
+ n = print_help (stdout, cmd);
+ print_help (stderr, NULL, " "); /* match prefix indentation */
+extern int print_help();
And that where the trace ends... I could not dig up further context why the function was invoked with 3 parameters instead of 2.
Any guidance is greatly appreciated
After taking a one-minute glance, my assumption is that at some point
print_help()also printed a prefix but they refactored it and forgot to update the code inttauth.c. This was not caught because its declaration inttauth.htakes an unspecified number of parameters. The semantics changed as of C23 to mean that the function takes no arguments (i.e.,void f()is equivalent tovoid f(void)now).Great thanks. That is too my assumption. I've looked into the code and unable to find any logic about prefixing so I guess the refactoring has removed it. I will make a Merge Request to fix the issue
I've just lodged new Merge Requet to address the issue https://sourceforge.net/p/cdesktopenv/code/merge-requests/75/
cc @jon13 @Love4Boobies
I'm not really familiar with the CDE code base, I've never even used it. I just randomly answered a couple of tickets that I accidentally stumbled upon after relogging onto my SF account after years of inactivity. Given that I have not studied the code and cannot easily test it, I recommend that you look at that output of that code to see whether any extra indentation is in order (since the original code seems to want to do it) or everything is alright the way you have it set up right now. If it's weirdly indented, you may need to add that indentation separately.
I've compared the output of the
ttauthbinary before and after removing the indentation, there is no difference. Therefore I can conclude the prefix indentation is basically dead code