Fixed compiler warnings in AuthTokenValidate.
This commit is contained in:
parent
af9da1fff2
commit
aa0df7c917
@ -74,7 +74,7 @@ PlatAllocMutex(void)
|
|||||||
//=======================================================================--
|
//=======================================================================--
|
||||||
{
|
{
|
||||||
PlatformMutex *pPlatMutex;
|
PlatformMutex *pPlatMutex;
|
||||||
pthread_mutexattr_t mutexAttr = {PTHREAD_MUTEX_RECURSIVE};
|
pthread_mutexattr_t mutexAttr;
|
||||||
|
|
||||||
DbgTrace(2, "-PlatAllocMutex- Start\n", 0);
|
DbgTrace(2, "-PlatAllocMutex- Start\n", 0);
|
||||||
|
|
||||||
@ -83,7 +83,30 @@ PlatAllocMutex(void)
|
|||||||
if (pPlatMutex)
|
if (pPlatMutex)
|
||||||
{
|
{
|
||||||
// Finish initializing the mutex
|
// Finish initializing the mutex
|
||||||
pthread_mutex_init(&pPlatMutex->mutex, &mutexAttr);
|
if (pthread_mutexattr_init(&mutexAttr) == 0)
|
||||||
|
{
|
||||||
|
if (pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE) == 0)
|
||||||
|
{
|
||||||
|
if (pthread_mutex_init(&pPlatMutex->mutex, &mutexAttr) != 0)
|
||||||
|
{
|
||||||
|
DbgTrace(0, "-PlatAllocMutex- Error %d initing mutex\n", errno);
|
||||||
|
free(pPlatMutex);
|
||||||
|
pPlatMutex = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DbgTrace(0, "-PlatAllocMutex- Error %d setting mutex type\n", errno);
|
||||||
|
free(pPlatMutex);
|
||||||
|
pPlatMutex = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DbgTrace(0, "-PlatAllocMutex- Error %d initing mutexattr\n", errno);
|
||||||
|
free(pPlatMutex);
|
||||||
|
pPlatMutex = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -204,10 +227,10 @@ OpenLibrary(
|
|||||||
libHandle = dlopen(pFileName, RTLD_LAZY);
|
libHandle = dlopen(pFileName, RTLD_LAZY);
|
||||||
if (libHandle == NULL)
|
if (libHandle == NULL)
|
||||||
{
|
{
|
||||||
DbgTrace(0, "-OpenLibrary- Not able to load library, error = %d\n", dlerror());
|
DbgTrace(0, "-OpenLibrary- Not able to load library, error = %s\n", dlerror());
|
||||||
}
|
}
|
||||||
|
|
||||||
DbgTrace(1, "-OpenLibrary- End, handle = %08X\n", libHandle);
|
DbgTrace(1, "-OpenLibrary- End, handle = %0lX\n", (long) libHandle);
|
||||||
|
|
||||||
return libHandle;
|
return libHandle;
|
||||||
}
|
}
|
||||||
@ -261,10 +284,10 @@ GetFunctionPtr(
|
|||||||
pFuncPtr = dlsym(libHandle, pFunctionName);
|
pFuncPtr = dlsym(libHandle, pFunctionName);
|
||||||
if (pFuncPtr == NULL)
|
if (pFuncPtr == NULL)
|
||||||
{
|
{
|
||||||
DbgTrace(0, "-GetFunctionPtr- Not able to obtain func ptr, error = %d\n", dlerror());
|
DbgTrace(0, "-GetFunctionPtr- Not able to obtain func ptr, error = %s\n", dlerror());
|
||||||
}
|
}
|
||||||
|
|
||||||
DbgTrace(1, "-GetFunctionPtr- End, pFuncPtr = %08X\n", pFuncPtr);
|
DbgTrace(1, "-GetFunctionPtr- End, pFuncPtr = %0lX\n", (long) pFuncPtr);
|
||||||
|
|
||||||
return pFuncPtr;
|
return pFuncPtr;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ ValidateAuthToken(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DbgTrace(0, "-ValidateAuthToken- Failed to load Ipc library, error = %d\n", dlerror());
|
DbgTrace(0, "-ValidateAuthToken- Failed to load Ipc library, error = %s\n", dlerror());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user