diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index b12f29d8c..68d914482 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -325,13 +325,13 @@ time_t mqx_time(time_t* timer) time_t XTIME(time_t * timer) { time_t sec = 0; - + sec = (time_t) MYTIME_gettime(); if (timer != NULL) *timer = sec; - return sec; + return sec; } #endif /* TIRTOS */ diff --git a/ctaocrypt/src/port.c b/ctaocrypt/src/port.c index 3442a530c..7e1b584a5 100644 --- a/ctaocrypt/src/port.c +++ b/ctaocrypt/src/port.c @@ -357,14 +357,14 @@ int UnLockMutex(CyaSSL_Mutex *m) int InitMutex(CyaSSL_Mutex* m) { Semaphore_Params params; - + Semaphore_Params_init(¶ms); params.mode = Semaphore_Mode_BINARY; *m = Semaphore_create(1, ¶ms, NULL); return 0; - } + } int FreeMutex(CyaSSL_Mutex* m) { @@ -383,7 +383,7 @@ int UnLockMutex(CyaSSL_Mutex *m) int UnLockMutex(CyaSSL_Mutex* m) { Semaphore_post(*m); - + return 0; } diff --git a/ctaocrypt/src/random.c b/ctaocrypt/src/random.c index 7a8409be2..b1fa87be4 100644 --- a/ctaocrypt/src/random.c +++ b/ctaocrypt/src/random.c @@ -770,8 +770,8 @@ int GenerateSeed(OS_Seed* os, byte* output, word32 sz) if ((i % 8) == 7) { srand(xdc_runtime_Timestamp_get32()); } - } - + } + return 0; } diff --git a/cyassl/ctaocrypt/port.h b/cyassl/ctaocrypt/port.h index acf0de385..d526e2243 100644 --- a/cyassl/ctaocrypt/port.h +++ b/cyassl/ctaocrypt/port.h @@ -108,7 +108,7 @@ #elif defined(CYASSL_CMSIS_RTOS) typedef osMutexId CyaSSL_Mutex; #elif defined(TIRTOS) - typedef ti_sysbios_knl_Semaphore_Handle CyaSSL_Mutex; + typedef ti_sysbios_knl_Semaphore_Handle CyaSSL_Mutex; #else #error Need a mutex type in multithreaded mode #endif /* USE_WINDOWS_API */ diff --git a/cyassl/ctaocrypt/settings.h b/cyassl/ctaocrypt/settings.h index bb3e9b3b4..69b208b75 100644 --- a/cyassl/ctaocrypt/settings.h +++ b/cyassl/ctaocrypt/settings.h @@ -285,7 +285,7 @@ #define USE_CERT_BUFFERS_2048 #define NO_ERROR_STRINGS #define USER_TIME - + #ifdef __IAR_SYSTEMS_ICC__ #pragma diag_suppress=Pa089 #elif !defined(__GNUC__) diff --git a/cyassl/test.h b/cyassl/test.h index 67002ebef..bd118cf24 100644 --- a/cyassl/test.h +++ b/cyassl/test.h @@ -41,7 +41,7 @@ #include #include #include - #define SOCKET_T int + #define SOCKET_T int #else #include #include @@ -480,7 +480,7 @@ static INLINE void tcp_socket(SOCKET_T* sockfd, int udp) if (*sockfd == INVALID_SOCKET) err_sys("socket failed\n"); #elif defined(TIRTOS) - if (*sockfd == -1) + if (*sockfd == -1) err_sys("socket failed\n"); #else if (*sockfd < 0) diff --git a/examples/echoserver/echoserver.c b/examples/echoserver/echoserver.c index 612b045ab..8e51646cc 100644 --- a/examples/echoserver/echoserver.c +++ b/examples/echoserver/echoserver.c @@ -108,7 +108,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) && \ - !defined(TIRTOS) + !defined(TIRTOS) port = 0; #endif #if defined(USE_ANY_ADDR) diff --git a/tests/api.c b/tests/api.c index 642115db7..c2499ec7c 100644 --- a/tests/api.c +++ b/tests/api.c @@ -977,8 +977,8 @@ THREAD_RETURN CYASSL_THREAD test_server_nofail(void* args) int idx; #ifdef TIRTOS - fdOpenSession(TaskSelf()); -#endif + fdOpenSession(TaskSelf()); +#endif ((func_args*)args)->return_code = TEST_FAIL; method = CyaSSLv23_server_method(); ctx = CyaSSL_CTX_new(method); @@ -1068,7 +1068,7 @@ done: #ifdef TIRTOS fdCloseSession(TaskSelf()); #endif -#ifndef TIRTOS +#ifndef TIRTOS return 0; #endif } diff --git a/tests/suites.c b/tests/suites.c index 7cd3e911a..0f24a2af3 100644 --- a/tests/suites.c +++ b/tests/suites.c @@ -192,7 +192,7 @@ static int execute_test_case(int svr_argc, char** svr_argv, strcat(commandLine, flagSep); } } - #if !defined(USE_WINDOWS_API) && !defined(TIRTOS) + #if !defined(USE_WINDOWS_API) && !defined(TIRTOS) /* add port 0 */ if (svr_argc + 2 > MAX_ARGS) printf("cannot add the magic port number flag to server\n"); diff --git a/testsuite/testsuite.c b/testsuite/testsuite.c index 51b23b7e2..35b7820db 100644 --- a/testsuite/testsuite.c +++ b/testsuite/testsuite.c @@ -57,12 +57,18 @@ enum { int myoptind = 0; char* myoptarg = NULL; + #ifndef NO_TESTSUITE_MAIN_DRIVER -int main(int argc, char** argv) -{ - return testsuite_test(argc, argv); -} -#endif + + static int testsuite_test(int argc, char** argv); + + int main(int argc, char** argv) + { + return testsuite_test(argc, argv); + } + +#endif /* NO_TESTSUITE_MAIN_DRIVER */ + int testsuite_test(int argc, char** argv) { @@ -172,7 +178,7 @@ int testsuite_test(int argc, char** argv) #ifdef TIRTOS fdCloseSession(TaskSelf()); #endif - + #ifdef HAVE_CAVIUM CspShutdown(CAVIUM_DEV_ID); #endif