]> git.ipfire.org Git - thirdparty/git.git/commit
contrib/credential: fix compiling "libsecret" helper
authorPatrick Steinhardt <ps@pks.im>
Tue, 18 Feb 2025 07:45:52 +0000 (08:45 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 19:40:03 +0000 (11:40 -0800)
commita47b8733b3f7db0c0db8cbfbdfc0aa2c197af6ee
tree3b2a5e7c5b9b73281bcb28326ecb75d92a7ccbcc
parentf8d95a323a088d88b5db1dd1cb2d554ac73caa10
contrib/credential: fix compiling "libsecret" helper

The "libsecret" credential helper does not compile when developer
warnings are enabled due to three warnings:

    - contrib/credential/libsecret/git-credential-libsecret.c:78:1:
      missing initializer for field ‘reserved’ of ‘SecretSchema’
      [-Werror=missing-field-initializers]. This issue is fixed by using
      designated initializers.

    - contrib/credential/libsecret/git-credential-libsecret.c:171:43:
      comparison of integer expressions of different signedness: ‘int’
      and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]. This
      issue is fixed by using an unsigned variable to iterate through
      the string vector.

    - contrib/credential/libsecret/git-credential-libsecret.c:420:14:
      unused parameter ‘argc’ [-Werror=unused-parameter]. This issue is
      fixed by checking the number of arguments, but in the least
      restrictive way possible.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/credential/libsecret/git-credential-libsecret.c