summaryrefslogtreecommitdiff
path: root/crypto/err/err_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/err/err_test.c')
-rw-r--r--crypto/err/err_test.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/crypto/err/err_test.c b/crypto/err/err_test.c
index 540ea07..230cada 100644
--- a/crypto/err/err_test.c
+++ b/crypto/err/err_test.c
@@ -14,11 +14,12 @@
#include <stdio.h>
+#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/mem.h>
-static int test_overflow() {
+static int test_overflow(void) {
unsigned i;
for (i = 0; i < ERR_NUM_ERRORS*2; i++) {
@@ -40,7 +41,7 @@ static int test_overflow() {
return 1;
}
-static int test_put_error() {
+static int test_put_error(void) {
uint32_t packed_error;
int line, flags;
const char *file;
@@ -72,7 +73,7 @@ static int test_put_error() {
return 1;
}
-static int test_clear_error() {
+static int test_clear_error(void) {
if (ERR_get_error() != 0) {
fprintf(stderr, "ERR_get_error returned value before an error was added.\n");
return 0;
@@ -89,7 +90,7 @@ static int test_clear_error() {
return 1;
}
-static int test_print() {
+static int test_print(void) {
size_t i;
char buf[256];
uint32_t packed_error;
@@ -105,13 +106,15 @@ static int test_print() {
return 1;
}
-static int test_release() {
+static int test_release(void) {
ERR_put_error(1, 2, 3, "test", 4);
ERR_remove_thread_state(NULL);
return 1;
}
-int main() {
+int main(void) {
+ CRYPTO_library_init();
+
if (!test_overflow() ||
!test_put_error() ||
!test_clear_error() ||