Git development
 help / color / mirror / Atom feed
From: Glen Choo <chooglen@google.com>
To: Lessley Dennington via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Cc: gitster@pobox.com, Lessley Dennington <lessleydennington@gmail.com>
Subject: Re: [PATCH] osx-keychain: fix compiler warning
Date: Tue, 19 Jul 2022 11:29:20 -0700	[thread overview]
Message-ID: <kl6llespt0qn.fsf@chooglen-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <pull.1293.git.1658251503775.gitgitgadget@gmail.com>

"Lessley Dennington via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Lessley Dennington <lessleydennington@gmail.com>
>
> Update git-credential-osxkeychain.c to remove 'format string is not a string
> literal (potentially insecure)' compiler warning by treating the string as
> an argument.
>
> Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>
> ---
>     osx-keychain: fix compiler warning
>     
>     Running make in contrib/credential/osxkeychain currently shows the
>     following warning:
>     
>     warning: format string is not a string literal (potentially insecure)
>     
>     This small change to treat the string as an argument fixes the issue.
>     
>     Thanks, Lessley

Thanks! I literally just ran into this warning, and it's been already
fixed :)

>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1293%2Fldennington%2Ffix-osx-keychain-warning-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1293/ldennington/fix-osx-keychain-warning-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1293
>
>  contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
> index 0b44a9b7cc6..bf77748d602 100644
> --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
> +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
> @@ -168,7 +168,7 @@ int main(int argc, const char **argv)
>  		"usage: git credential-osxkeychain <get|store|erase>";
>  
>  	if (!argv[1])
> -		die(usage);
> +		die("%s", usage);
>  
>  	read_credential();

Looks good!

>  
>
> base-commit: 71a8fab31b70c417e8f5b5f716581f89955a7082
> -- 
> gitgitgadget

      parent reply	other threads:[~2022-07-19 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 17:25 [PATCH] osx-keychain: fix compiler warning Lessley Dennington via GitGitGadget
2022-07-19 17:30 ` Derrick Stolee
2022-07-19 18:24 ` Junio C Hamano
2022-07-19 18:29 ` Glen Choo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=kl6llespt0qn.fsf@chooglen-macbookpro.roam.corp.google.com \
    --to=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=lessleydennington@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox