From 77daf05dd008e7195869927c5b20642b425915c7 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 18 Sep 2018 14:37:30 -0700 Subject: [PATCH] Add HC_API_CALL to a few functions On 32-bit MinGW, clang was throwing errors about this. 64-bit MinGW and regular MSYS does not throw warnings after the change. --- include/autotune.h | 2 +- include/dispatch.h | 4 ++-- include/monitor.h | 2 +- include/outfile_check.h | 2 +- include/selftest.h | 2 +- include/terminal.h | 2 +- src/autotune.c | 2 +- src/dispatch.c | 4 ++-- src/monitor.c | 2 +- src/outfile_check.c | 2 +- src/selftest.c | 2 +- src/terminal.c | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/autotune.h b/include/autotune.h index e59607199..0bc7aa183 100644 --- a/include/autotune.h +++ b/include/autotune.h @@ -6,6 +6,6 @@ #ifndef _AUTOTUNE_H #define _AUTOTUNE_H -void *thread_autotune (void *p); +HC_API_CALL void *thread_autotune (void *p); #endif // _AUTOTUNE_H diff --git a/include/dispatch.h b/include/dispatch.h index 05ef1efbc..459213cbb 100644 --- a/include/dispatch.h +++ b/include/dispatch.h @@ -6,7 +6,7 @@ #ifndef _DISPATCH_H #define _DISPATCH_H -void *thread_calc_stdin (void *p); -void *thread_calc (void *p); +HC_API_CALL void *thread_calc_stdin (void *p); +HC_API_CALL void *thread_calc (void *p); #endif // _DISPATCH_H diff --git a/include/monitor.h b/include/monitor.h index 2f6da11ab..7aff8d077 100644 --- a/include/monitor.h +++ b/include/monitor.h @@ -8,6 +8,6 @@ int get_runtime_left (const hashcat_ctx_t *hashcat_ctx); -void *thread_monitor (void *p); +HC_API_CALL void *thread_monitor (void *p); #endif // _MONITOR_H diff --git a/include/outfile_check.h b/include/outfile_check.h index a0dcd8bc6..3ecbcad13 100644 --- a/include/outfile_check.h +++ b/include/outfile_check.h @@ -11,7 +11,7 @@ #define OUTFILES_DIR "outfiles" -void *thread_outfile_remove (void *p); +HC_API_CALL void *thread_outfile_remove (void *p); int outcheck_ctx_init (hashcat_ctx_t *hashcat_ctx); void outcheck_ctx_destroy (hashcat_ctx_t *hashcat_ctx); diff --git a/include/selftest.h b/include/selftest.h index cea4fce25..6b2770f21 100644 --- a/include/selftest.h +++ b/include/selftest.h @@ -6,6 +6,6 @@ #ifndef _SELFTEST_H #define _SELFTEST_H -void *thread_selftest (void *p); +HC_API_CALL void *thread_selftest (void *p); #endif // _SELFTEST_H diff --git a/include/terminal.h b/include/terminal.h index eab674145..1687b9a9e 100644 --- a/include/terminal.h +++ b/include/terminal.h @@ -29,7 +29,7 @@ int setup_console (void); void send_prompt (hashcat_ctx_t *hashcat_ctx); void clear_prompt (hashcat_ctx_t *hashcat_ctx); -void *thread_keypress (void *p); +HC_API_CALL void *thread_keypress (void *p); #if defined (_WIN) void SetConsoleWindowSize (const int x); diff --git a/src/autotune.c b/src/autotune.c index 2998ddd02..3be1743c7 100644 --- a/src/autotune.c +++ b/src/autotune.c @@ -272,7 +272,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param return 0; } -void *thread_autotune (void *p) +HC_API_CALL void *thread_autotune (void *p) { thread_param_t *thread_param = (thread_param_t *) p; diff --git a/src/dispatch.c b/src/dispatch.c index 0c5a3fe50..0bd93bf62 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -474,7 +474,7 @@ static int calc_stdin (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par return 0; } -void *thread_calc_stdin (void *p) +HC_API_CALL void *thread_calc_stdin (void *p) { thread_param_t *thread_param = (thread_param_t *) p; @@ -1429,7 +1429,7 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param) return 0; } -void *thread_calc (void *p) +HC_API_CALL void *thread_calc (void *p) { thread_param_t *thread_param = (thread_param_t *) p; diff --git a/src/monitor.c b/src/monitor.c index 5ec7db81d..9554ab718 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -308,7 +308,7 @@ static int monitor (hashcat_ctx_t *hashcat_ctx) return 0; } -void *thread_monitor (void *p) +HC_API_CALL void *thread_monitor (void *p) { hashcat_ctx_t *hashcat_ctx = (hashcat_ctx_t *) p; diff --git a/src/outfile_check.c b/src/outfile_check.c index ab85d9299..b0539b6c1 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -325,7 +325,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) return 0; } -void *thread_outfile_remove (void *p) +HC_API_CALL void *thread_outfile_remove (void *p) { hashcat_ctx_t *hashcat_ctx = (hashcat_ctx_t *) p; diff --git a/src/selftest.c b/src/selftest.c index ebc61194a..5f17e853e 100644 --- a/src/selftest.c +++ b/src/selftest.c @@ -552,7 +552,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param return 0; } -void *thread_selftest (void *p) +HC_API_CALL void *thread_selftest (void *p) { thread_param_t *thread_param = (thread_param_t *) p; diff --git a/src/terminal.c b/src/terminal.c index 6f5737fa7..1ac4a4713 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -314,7 +314,7 @@ static void keypress (hashcat_ctx_t *hashcat_ctx) tty_fix (); } -void *thread_keypress (void *p) +HC_API_CALL void *thread_keypress (void *p) { hashcat_ctx_t *hashcat_ctx = (hashcat_ctx_t *) p;