From 8d902637b2c7500ea93fe16ab390cc9b86de0979 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 10 Sep 2014 11:10:51 -0600 Subject: [PATCH] add ctaocrypt_test() return value to fix err_sys() on IAR --- ctaocrypt/test/test.c | 8 +++++--- ctaocrypt/test/test.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ctaocrypt/test/test.c b/ctaocrypt/test/test.c index 4e2cc655b..896e540bf 100644 --- a/ctaocrypt/test/test.c +++ b/ctaocrypt/test/test.c @@ -192,11 +192,11 @@ int pbkdf2_test(void); -static void err_sys(const char* msg, int es) +static int err_sys(const char* msg, int es) { printf("%s error = %d\n", msg, es); - return; + return -1; /* error state */ } /* func_args from test.h, so don't have to pull in other junk */ @@ -208,7 +208,7 @@ typedef struct func_args { -void ctaocrypt_test(void* args) +int ctaocrypt_test(void* args) { int ret = 0; @@ -498,6 +498,8 @@ void ctaocrypt_test(void* args) #endif ((func_args*)args)->return_code = ret; + + return ret; } diff --git a/ctaocrypt/test/test.h b/ctaocrypt/test/test.h index 2310ed516..ad02ccaff 100644 --- a/ctaocrypt/test/test.h +++ b/ctaocrypt/test/test.h @@ -25,7 +25,7 @@ extern "C" { #endif -void ctaocrypt_test(void* args); +int ctaocrypt_test(void* args); #ifdef __cplusplus } /* extern "C" */