pkcs11-util: Explicitly initiaiize variable to avoid warning
Avoid the following warning on C9S by explicitly initializing
"object".
"""
[389/2801] Compiling C object src/shared/libsystemd-shared-256-devel.a.p/pkcs11-util.c.o
../src/src/shared/pkcs11-util.c: In function ‘pkcs11_token_find_private_key’:
../src/src/shared/pkcs11-util.c:983:21: warning: ‘object’ may be used uninitialized in this function [-Wmaybe-uninitialized]
983 | *ret_object = object;
| ~~~~~~~~~~~~^~~~~~~~
"""
This commit is contained in:
committed by
Luca Boccassi
parent
33b9337130
commit
5b54fe8d6d
@@ -873,7 +873,7 @@ int pkcs11_token_find_private_key(
|
||||
uint_fast8_t n_objects = 0;
|
||||
bool found_class = false;
|
||||
_cleanup_free_ CK_ATTRIBUTE *attributes_buffer = NULL;
|
||||
CK_OBJECT_HANDLE object, candidate;
|
||||
CK_OBJECT_HANDLE object = 0, candidate;
|
||||
static const CK_OBJECT_CLASS class = CKO_PRIVATE_KEY;
|
||||
CK_BBOOL decrypt_value, derive_value;
|
||||
CK_ATTRIBUTE optional_attributes[] = {
|
||||
|
||||
Reference in New Issue
Block a user