compiler warning about myStack use

This commit is contained in:
kaleb-himes 2015-12-31 13:59:11 -07:00
parent 71a3555f6f
commit fa3f0660b6

View File

@ -1374,7 +1374,7 @@ typedef THREAD_RETURN WOLFSSL_THREAD (*thread_func)(void* args);
static INLINE void StackSizeCheck(func_args* args, thread_func tf)
{
int ret, i, used;
unsigned char* myStack;
unsigned char* myStack = NULL;
int stackSize = 1024*128;
pthread_attr_t myAttr;
pthread_t threadId;
@ -1388,7 +1388,10 @@ static INLINE void StackSizeCheck(func_args* args, thread_func tf)
if (ret != 0)
err_sys("posix_memalign failed\n");
memset(myStack, 0x01, stackSize);
XMEMSET(myStack, 0x01, stackSize);
if (myStack == NULL)
err_sys("Failed to initialize myStack");
ret = pthread_attr_init(&myAttr);
if (ret != 0)