gnome-base/gnome-keyring: fix modern C issue in tests

Closes: https://bugs.gentoo.org/922630
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2024-03-17 03:10:06 +00:00
parent 515f3fc217
commit da33ef820a
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
https://bugs.gentoo.org/922630
https://gitlab.gnome.org/GNOME/gnome-keyring/-/commit/f298c87e14e89656992ccfd17b133f4f2ab9c5ea
From f298c87e14e89656992ccfd17b133f4f2ab9c5ea Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Wed, 24 Jan 2024 14:01:06 -0500
Subject: [PATCH] gkm: fix test-sexp with GCC 14
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
pkcs11/gkm/test-sexp.c: In function ‘test_sign_verify’:
pkcs11/gkm/test-sexp.c:231:92: error: passing argument 6 of ‘gkm_crypto_sign_xsa’ from incompatible pointer type [-Wincompatible-pointer-types]
In file included from pkcs11/gkm/test-sexp.c:31:
./pkcs11/gkm/gkm-crypto.h:92:86: note: expected ‘CK_ULONG_PTR’ {aka ‘long unsigned int *’} but argument is of type ‘gsize *’ {aka ‘unsigned int *’}
pkcs11/gkm/test-sexp.c:251:87: error: passing argument 6 of ‘gkm_crypto_sign_xsa’ from incompatible pointer type [-Wincompatible-pointer-types]
./pkcs11/gkm/gkm-crypto.h:92:86: note: expected ‘CK_ULONG_PTR’ {aka ‘long unsigned int *’} but argument is of type ‘gsize *’ {aka ‘unsigned int *’}
pkcs11/gkm/test-sexp.c:271:91: error: passing argument 6 of ‘gkm_crypto_sign_xsa’ from incompatible pointer type [-Wincompatible-pointer-types]
./pkcs11/gkm/gkm-crypto.h:92:86: note: expected ‘CK_ULONG_PTR’ {aka ‘long unsigned int *’} but argument is of type ‘gsize *’ {aka ‘unsigned int *’}
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
--- a/pkcs11/gkm/test-sexp.c
+++ b/pkcs11/gkm/test-sexp.c
@@ -221,10 +221,10 @@ test_sign_verify (Test *test, gconstpointer unused)
{
gcry_sexp_t pubkey = NULL;
gboolean ret;
- guchar data[] = TEST_DATA;
- guchar data_size = TEST_DATA_SIZE;
- guchar signature[128];
- gsize signature_size = 128;
+ CK_BYTE data[] = TEST_DATA;
+ CK_ULONG data_size = TEST_DATA_SIZE;
+ CK_BYTE signature[128];
+ CK_ULONG signature_size = 128;
/* RSA */
/* sign some data */
--
GitLab

View File

@@ -40,6 +40,10 @@ BDEPEND="
test? ( ${PYTHON_DEPS} )
"
PATCHES=(
"${FILESDIR}"/gnome-keyring-42.1-c99.patch
)
pkg_setup() {
use test && python-any-r1_pkg_setup
}