From 29eabe5535a0f9fc3eeefacbe055c9dc69bb3b34 Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 3 Apr 2017 09:41:12 -0700 Subject: [PATCH] Better stack size check return code handling. --- wolfssl/test.h | 2 +- wolfssl/wolfcrypt/types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfssl/test.h b/wolfssl/test.h index 0241bf39a..db73f406c 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -1386,7 +1386,7 @@ static INLINE int StackSizeCheck(func_args* args, thread_func tf) used = stackSize - i; printf("stack used = %d\n", used); - return (int)status; + return (int)((size_t)status); } diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index b82f2779b..9b1922609 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -441,7 +441,7 @@ #ifdef WOLFSSL_RIOT_OS #define EXIT_TEST(ret) exit(ret) #elif defined(HAVE_STACK_SIZE) - #define EXIT_TEST(ret) return (void*)((long)(ret)) + #define EXIT_TEST(ret) return (void*)((size_t)(ret)) #else #define EXIT_TEST(ret) return ret #endif