Commit 021e5043 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Please Clang's sanitizer.

PR: #3424,#3423,#3422
parent c4f8efab
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -154,6 +154,8 @@

#if defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER)
#define ROTL(a,n)     (_lrotl(a,n))
#elif defined(PEDANTIC)
#define ROTL(a,n)     ((((a)<<(n))&0xffffffffL)|((a)>>((32-(n))&31)))
#else
#define ROTL(a,n)     ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n))))
#endif
+10 −10
Original line number Diff line number Diff line
@@ -235,11 +235,11 @@
#   endif
#  endif
# endif
#endif
# if defined(__s390__) || defined(__s390x__)
#  define HOST_c2l(c,l) ((l)=*((const unsigned int *)(c)), (c)+=4, (l))
#  define HOST_l2c(l,c) (*((unsigned int *)(c))=(l), (c)+=4, (l))
# endif
#endif

#ifndef HOST_c2l
#define HOST_c2l(c,l)	(l =(((unsigned long)(*((c)++)))<<24),		\
@@ -269,7 +269,6 @@
				   (c)+=4; (l);				})
#  endif
# endif
#endif
# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__)
#  ifndef B_ENDIAN
    /* See comment in DATA_ORDER_IS_BIG_ENDIAN section. */
@@ -277,6 +276,7 @@
#   define HOST_l2c(l,c)	(*((unsigned int *)(c))=(l), (c)+=4, l)
#  endif
# endif
#endif

#ifndef HOST_c2l
#define HOST_c2l(c,l)	(l =(((unsigned long)(*((c)++)))    ),		\
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@
#endif
#include <assert.h>

#ifndef STRICT_ALIGNMENT
#if !defined(STRICT_ALIGNMENT) && !defined(PEDANTIC)
#  define STRICT_ALIGNMENT 0
#endif

+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ typedef unsigned int u32;
typedef unsigned char u8;

#define STRICT_ALIGNMENT 1
#ifndef PEDANTIC
#if defined(__i386)	|| defined(__i386__)	|| \
    defined(__x86_64)	|| defined(__x86_64__)	|| \
    defined(_M_IX86)	|| defined(_M_AMD64)	|| defined(_M_X64) || \
@@ -33,6 +34,7 @@ typedef unsigned char u8;
    defined(__s390__)	|| defined(__s390x__)
# undef STRICT_ALIGNMENT
#endif
#endif

#if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
#if defined(__GNUC__) && __GNUC__>=2
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
        y=key->y;     
        d=key->data; 

#if defined(RC4_CHUNK)
#if defined(RC4_CHUNK) && !defined(PEDANTIC)
	/*
	 * The original reason for implementing this(*) was the fact that
	 * pre-21164a Alpha CPUs don't have byte load/store instructions
Loading