File openssl-gcc-attributes.patch of Package openssl-1_0_0.21013

Index: openssl-1.0.2a/crypto/cryptlib.h
===================================================================
--- openssl-1.0.2a.orig/crypto/cryptlib.h	2015-05-24 13:18:57.391397563 +0200
+++ openssl-1.0.2a/crypto/cryptlib.h	2015-05-24 13:21:21.703498853 +0200
@@ -100,7 +100,7 @@ extern "C" {
 
 void OPENSSL_cpuid_setup(void);
 extern unsigned int OPENSSL_ia32cap_P[];
-void OPENSSL_showfatal(const char *fmta, ...);
+void OPENSSL_showfatal(const char *fmta, ...) __attribute__ ((format (printf, 1, 2)));
 void *OPENSSL_stderr(void);
 extern int OPENSSL_NONPIC_relocated;
 
Index: openssl-1.0.2a/crypto/crypto.h
===================================================================
--- openssl-1.0.2a.orig/crypto/crypto.h	2015-05-24 13:18:57.391397563 +0200
+++ openssl-1.0.2a/crypto/crypto.h	2015-05-24 13:23:15.110150336 +0200
@@ -529,15 +529,15 @@ void CRYPTO_get_mem_debug_functions(void
                                     void (**f) (void *, int),
                                     void (**so) (long), long (**go) (void));
 
-void *CRYPTO_malloc_locked(int num, const char *file, int line);
+void *CRYPTO_malloc_locked(int num, const char *file, int line) __attribute__((alloc_size(1)));
 void CRYPTO_free_locked(void *ptr);
-void *CRYPTO_malloc(int num, const char *file, int line);
+void *CRYPTO_malloc(int num, const char *file, int line) __attribute__((alloc_size(1)));
 char *CRYPTO_strdup(const char *str, const char *file, int line);
 void CRYPTO_free(void *ptr);
-void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
+void *CRYPTO_realloc(void *addr,int num, const char *file, int line) __attribute__((alloc_size(2)));
 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
-                           int line);
-void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
+			   int line) __attribute__((alloc_size(3)));
+void *CRYPTO_remalloc(void *addr,int num, const char *file, int line) __attribute__((alloc_size(2)));
 
 void OPENSSL_cleanse(void *ptr, size_t len);
 
openSUSE Build Service is sponsored by