From e779c22c2c504740451f75a47596f862bf2f8a4e Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 5 Apr 2019 15:33:35 +0200 Subject: [PATCH] Remove some warnings no longer needed --- src/modules/module_06400.c | 16 +--------------- src/modules/module_08200.c | 2 +- src/modules/module_08300.c | 16 +--------------- src/modules/module_15700.c | 9 --------- src/modules/module_18800.c | 16 +--------------- 5 files changed, 4 insertions(+), 55 deletions(-) diff --git a/src/modules/module_06400.c b/src/modules/module_06400.c index 998cf2447..266ed1d9a 100644 --- a/src/modules/module_06400.c +++ b/src/modules/module_06400.c @@ -254,20 +254,6 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con return pw_max; } -bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - if (device_param->platform_vendor_id == VENDOR_ID_APPLE) - { - // trap 6 - if ((device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->device_type & CL_DEVICE_TYPE_GPU)) - { - return true; - } - } - - return false; -} - char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -455,6 +441,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_08200.c b/src/modules/module_08200.c index 14e2914c0..96875fa57 100644 --- a/src/modules/module_08200.c +++ b/src/modules/module_08200.c @@ -230,7 +230,7 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE const cloudkey_t *cloudkey = (const cloudkey_t *) esalt_buf; - char data_buf[4096] = { 0 }; + char data_buf[4096 + 1] = { 0 }; for (int i = 0, j = 0; i < 512; i += 1, j += 8) { diff --git a/src/modules/module_08300.c b/src/modules/module_08300.c index 581be544b..edb854060 100644 --- a/src/modules/module_08300.c +++ b/src/modules/module_08300.c @@ -42,20 +42,6 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } -bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - if (device_param->platform_vendor_id == VENDOR_ID_APPLE) - { - // trap 6 - if ((device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->device_type & CL_DEVICE_TYPE_GPU)) - { - return true; - } - } - - return false; -} - int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -277,6 +263,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_15700.c b/src/modules/module_15700.c index 643689fde..ca6400fec 100644 --- a/src/modules/module_15700.c +++ b/src/modules/module_15700.c @@ -253,15 +253,6 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE return true; } - if (device_param->platform_vendor_id == VENDOR_ID_APPLE) - { - // trap 6 - if ((device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->device_type & CL_DEVICE_TYPE_GPU)) - { - return true; - } - } - return false; } diff --git a/src/modules/module_18800.c b/src/modules/module_18800.c index 716f01c12..77f94b5c6 100644 --- a/src/modules/module_18800.c +++ b/src/modules/module_18800.c @@ -79,20 +79,6 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con return pw_max; } -bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - if (device_param->platform_vendor_id == VENDOR_ID_APPLE) - { - // trap 6 - if ((device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->device_type & CL_DEVICE_TYPE_GPU)) - { - return true; - } - } - - return false; -} - int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -265,6 +251,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; }