Fix pk11helper module compiler warnings

Ticket: https://fedorahosted.org/freeipa/ticket/4657
Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Martin Basti 2014-10-29 14:45:45 +01:00 committed by Petr Viktorin
parent a3c799f2f4
commit 58737c7791
4 changed files with 6 additions and 10 deletions

View File

@ -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)
{

View File

@ -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

View File

@ -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)) {

View File

@ -23,7 +23,6 @@ module = Extension('_ipap11helper',
'-ggdb3',
'-O2',
'-W',
'-pedantic',
'-Wall',
'-Wno-unused-parameter',
'-Wbad-function-cast',