mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix pk11helper module compiler warnings
Ticket: https://fedorahosted.org/freeipa/ticket/4657 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
a3c799f2f4
commit
58737c7791
@ -44,7 +44,7 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
// Load the PKCS#11 library
|
||||
CK_C_GetFunctionList loadLibrary(char* module, void** moduleHandle)
|
||||
CK_C_GetFunctionList loadLibrary(const char* module, void** moduleHandle)
|
||||
{
|
||||
CK_C_GetFunctionList pGetFunctionList = NULL;
|
||||
|
||||
@ -54,13 +54,9 @@ CK_C_GetFunctionList loadLibrary(char* module, void** moduleHandle)
|
||||
if (module)
|
||||
{
|
||||
pDynLib = dlopen(module, RTLD_NOW | RTLD_LOCAL);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
pDynLib = dlopen(DEFAULT_PKCS11_LIB, RTLD_NOW | RTLD_LOCAL);
|
||||
}
|
||||
*/
|
||||
|
||||
if (pDynLib == NULL)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#include <p11-kit/pkcs11.h>
|
||||
|
||||
CK_C_GetFunctionList loadLibrary(char* module, void** moduleHandle);
|
||||
CK_C_GetFunctionList loadLibrary(const char* module, void** moduleHandle);
|
||||
void unloadLibrary(void* moduleHandle);
|
||||
|
||||
#endif // !_SOFTHSM_V2_BIN_LIBRARY_H
|
||||
|
@ -1659,10 +1659,11 @@ P11_Helper_set_attribute(P11_Helper* self, PyObject *args, PyObject *kwds) {
|
||||
goto final;
|
||||
}
|
||||
if (PyString_AsStringAndSize(value, (char **) &attribute.pValue,
|
||||
&attribute.ulValueLen) == -1) {
|
||||
&len) == -1) {
|
||||
ret = NULL;
|
||||
goto final;
|
||||
}
|
||||
attribute.ulValueLen = len;
|
||||
break;
|
||||
case CKA_LABEL:
|
||||
if (!PyUnicode_Check(value)) {
|
||||
|
@ -23,7 +23,6 @@ module = Extension('_ipap11helper',
|
||||
'-ggdb3',
|
||||
'-O2',
|
||||
'-W',
|
||||
'-pedantic',
|
||||
'-Wall',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wbad-function-cast',
|
||||
|
Loading…
Reference in New Issue
Block a user