fix new warnings on linux64
This commit is contained in:
parent
4433fde099
commit
4e19c234f4
@ -125,8 +125,10 @@ static void err_sys(const char* msg, int es)
|
||||
{
|
||||
printf("%s error = %d\n", msg, es);
|
||||
#ifndef THREADX
|
||||
exit(es);
|
||||
if (msg)
|
||||
exit(es);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
/* func_args from test.h, so don't have to pull in other junk */
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
#pragma once;
|
||||
#pragma once
|
||||
|
||||
void ctaocrypt_test(void* args);
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
|| defined(__mips64) || defined(__x86_64__))
|
||||
/* long should be 64bit */
|
||||
#define SIZEOF_LONG 8
|
||||
#elif (defined__i386__)
|
||||
#elif defined(__i386__)
|
||||
/* long long should be 64bit */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
@ -66,11 +66,11 @@
|
||||
#define WORD64_AVAILABLE
|
||||
#define W64LIT(x) x##ui64
|
||||
typedef unsigned __int64 word64;
|
||||
#elif SIZEOF_LONG == 8
|
||||
#elif defined(SIZEOF_LONG) && SIZEOF_LONG == 8
|
||||
#define WORD64_AVAILABLE
|
||||
#define W64LIT(x) x##LL
|
||||
typedef unsigned long word64;
|
||||
#elif SIZEOF_LONG_LONG == 8
|
||||
#elif defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG == 8
|
||||
#define WORD64_AVAILABLE
|
||||
#define W64LIT(x) x##LL
|
||||
typedef unsigned long long word64;
|
||||
|
@ -151,7 +151,8 @@ static const word16 yasslPort = 11111;
|
||||
static INLINE void err_sys(const char* msg)
|
||||
{
|
||||
printf("yassl error: %s\n", msg);
|
||||
exit(EXIT_FAILURE);
|
||||
if (msg)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,6 +53,8 @@
|
||||
# AX_APPEND_COMPILE_FLAGS([-fstack-protector-all]) -- Issues on 32bit compile
|
||||
# AX_APPEND_COMPILE_FLAGS([-Wlong-long]) -- Don't turn on for compatibility issues memcached_stat_st
|
||||
# AX_APPEND_COMPILE_FLAGS([-Wold-style-definition]) -- Mixed with -Werror either before or after is a problem because tests use main() instead of main(void)
|
||||
# AX_APPEND_COMPILE_FLAGS([-std=c99]) -- problem seeing DT_REG from dirent.h on some systems
|
||||
# AX_APPEND_COMPILE_FLAGS([-Wlogical-op]) -- doesn't like strchr argument in mygetopt for now
|
||||
|
||||
#serial 2
|
||||
AC_DEFUN([AX_HARDEN_LINKER_FLAGS], [
|
||||
@ -84,13 +86,11 @@
|
||||
|
||||
AX_APPEND_COMPILE_FLAGS([-Wall])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wextra])
|
||||
AX_APPEND_COMPILE_FLAGS([-std=c99])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wnested-externs])
|
||||
AX_APPEND_COMPILE_FLAGS([-Woverride-init])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wlogical-op])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-strict-aliasing])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wfloat-equal])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wundef])
|
||||
@ -147,7 +147,6 @@
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wlogical-op])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wnon-virtual-dtor])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wnormalized=id])
|
||||
AX_APPEND_COMPILE_FLAGS([-Woverloaded-virtual])
|
||||
|
@ -2671,10 +2671,10 @@ static INLINE void Encrypt(CYASSL* ssl, byte* out, const byte* input, word32 sz)
|
||||
case aes:
|
||||
#ifdef CYASSL_AESNI
|
||||
if ((word)input % 16) {
|
||||
byte buffer[MAX_RECORD_SIZE + MAX_COMP_EXTRA+MAX_MSG_EXTRA];
|
||||
XMEMCPY(buffer, input, sz);
|
||||
AesCbcEncrypt(ssl->encrypt.aes, buffer, buffer, sz);
|
||||
XMEMCPY(out, buffer, sz);
|
||||
byte buff[MAX_RECORD_SIZE + MAX_COMP_EXTRA+MAX_MSG_EXTRA];
|
||||
XMEMCPY(buff, input, sz);
|
||||
AesCbcEncrypt(ssl->encrypt.aes, buff, buff, sz);
|
||||
XMEMCPY(out, buff, sz);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -3016,7 +3016,7 @@ static int GetInputData(CYASSL *ssl, word32 size)
|
||||
negative number is error */
|
||||
int ProcessReply(CYASSL* ssl)
|
||||
{
|
||||
int ret, type, readSz;
|
||||
int ret = 0, type, readSz;
|
||||
word32 startIdx = 0;
|
||||
#ifndef NO_CYASSL_SERVER
|
||||
byte b0, b1;
|
||||
|
@ -19,6 +19,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cyassl/ssl.h>
|
||||
#include <cyassl/test.h>
|
||||
|
@ -19,8 +19,13 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cyassl/ssl.h>
|
||||
#include <tests/unit.h>
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
/* unit.c unit tests driver */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tests/unit.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user