From: Ramsay Jones Date: Sat, 31 Aug 2024 14:58:56 +0000 (+0100) Subject: compat/terminal: mark parameter of git_terminal_prompt() UNUSED X-Git-Tag: v2.46.1~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4dc0efd7d4b71acadae61f619b9e84f97d15c83;p=thirdparty%2Fgit.git compat/terminal: mark parameter of git_terminal_prompt() UNUSED If neither HAVE_DEV_TTY nor GIT_WINDOWS_NATIVE is set, the fallback code calls the system getpass(). This unfortunately ignores the "echo" boolean parameter, as we have no way to implement that functionality. But we still have to keep the unused parameter, since our interface has to match the other implementations. Co-authored-by: Jeff King Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- diff --git a/compat/terminal.c b/compat/terminal.c index 0afda730f2..d54efa1c5d 100644 --- a/compat/terminal.c +++ b/compat/terminal.c @@ -594,7 +594,7 @@ void restore_term(void) { } -char *git_terminal_prompt(const char *prompt, int echo) +char *git_terminal_prompt(const char *prompt, int echo UNUSED) { return getpass(prompt); }