diff --git a/src/opencl_DES_bs.h b/src/opencl_DES_bs.h index 62acca1d96..e086711a22 100644 --- a/src/opencl_DES_bs.h +++ b/src/opencl_DES_bs.h @@ -60,7 +60,7 @@ extern int restore_lws_config(const char *, int, size_t *, size_t, unsigned int typedef unsigned WORD vtype; -unsigned int CC_CACHE_ALIGN opencl_DES_bs_index768[0x300]; +extern unsigned int CC_CACHE_ALIGN opencl_DES_bs_index768[0x300]; struct fmt_main; diff --git a/src/opencl_DES_bs_plug.c b/src/opencl_DES_bs_plug.c index 548a7e101f..be25d0216e 100644 --- a/src/opencl_DES_bs_plug.c +++ b/src/opencl_DES_bs_plug.c @@ -40,6 +40,7 @@ static opencl_DES_bs_transfer *des_raw_keys; static unsigned int *des_int_key_loc; static unsigned int static_gpu_locations[MASK_FMT_INT_PLHDR]; static size_t process_key_gws; +unsigned int CC_CACHE_ALIGN opencl_DES_bs_index768[0x300]; unsigned char opencl_DES_E[48] = { 31, 0, 1, 2, 3, 4, diff --git a/src/opencl_agilekeychain_fmt_plug.c b/src/opencl_agilekeychain_fmt_plug.c index 8845c6c90b..e8c8e6dd03 100644 --- a/src/opencl_agilekeychain_fmt_plug.c +++ b/src/opencl_agilekeychain_fmt_plug.c @@ -76,7 +76,7 @@ static agile_password *inbuffer; static agile_hash *outbuffer; static agile_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize; static struct fmt_main *self; #define STEP 0 diff --git a/src/opencl_axcrypt_fmt_plug.c b/src/opencl_axcrypt_fmt_plug.c index 4cc18c08fd..ce2041b79a 100644 --- a/src/opencl_axcrypt_fmt_plug.c +++ b/src/opencl_axcrypt_fmt_plug.c @@ -74,7 +74,7 @@ static axcrypt_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize; #define STEP 0 #define SEED 256 diff --git a/src/opencl_gpg_fmt_plug.c b/src/opencl_gpg_fmt_plug.c index c48b491007..64623e7527 100644 --- a/src/opencl_gpg_fmt_plug.c +++ b/src/opencl_gpg_fmt_plug.c @@ -101,7 +101,7 @@ static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; static cl_kernel crypt_kernel_sha256, crypt_kernel_sha512; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize, cracked_size; #define STEP 0 #define SEED 256 diff --git a/src/opencl_keychain_fmt_plug.c b/src/opencl_keychain_fmt_plug.c index b270938280..0045a02d35 100644 --- a/src/opencl_keychain_fmt_plug.c +++ b/src/opencl_keychain_fmt_plug.c @@ -78,7 +78,7 @@ static keychain_out *outbuffer; static keychain_salt currentsalt; static cl_mem mem_in, mem_dk, mem_salt, mem_out; -size_t insize, dksize, saltsize, outsize; +static size_t insize, dksize, saltsize, outsize; #define STEP 0 #define SEED 256 diff --git a/src/opencl_lm.h b/src/opencl_lm.h index 689f56f9e1..5e5a939d0e 100644 --- a/src/opencl_lm.h +++ b/src/opencl_lm.h @@ -68,9 +68,9 @@ typedef unsigned WORD vtype; -unsigned int CC_CACHE_ALIGN opencl_lm_index768[0x300]; +extern unsigned int CC_CACHE_ALIGN opencl_lm_index768[0x300]; -unsigned char opencl_lm_u[0x100]; +extern unsigned char opencl_lm_u[0x100]; typedef struct { unsigned char *pxkeys[LM_DEPTH]; /* Pointers into xkeys.c */ diff --git a/src/opencl_lm_plug.c b/src/opencl_lm_plug.c index 2cd0703245..42073129fc 100644 --- a/src/opencl_lm_plug.c +++ b/src/opencl_lm_plug.c @@ -19,6 +19,8 @@ opencl_lm_combined *opencl_lm_all; opencl_lm_transfer *opencl_lm_keys; unsigned int *opencl_lm_int_key_loc = NULL; +unsigned int CC_CACHE_ALIGN opencl_lm_index768[0x300]; +unsigned char opencl_lm_u[0x100]; static unsigned char LM_KP[56] = { 1, 2, 3, 4, 5, 6, 7, diff --git a/src/opencl_odf_fmt_plug.c b/src/opencl_odf_fmt_plug.c index c5172d7c45..3b0ceadaf7 100644 --- a/src/opencl_odf_fmt_plug.c +++ b/src/opencl_odf_fmt_plug.c @@ -67,7 +67,7 @@ static odf_password *saved_key; static odf_out *crypt_out; static odf_salt currentsalt; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize; static struct custom_salt *cur_salt; diff --git a/src/opencl_pfx_fmt_plug.c b/src/opencl_pfx_fmt_plug.c index 8c0bc01bd2..53050d9b7d 100644 --- a/src/opencl_pfx_fmt_plug.c +++ b/src/opencl_pfx_fmt_plug.c @@ -91,7 +91,7 @@ static pfx_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize; #define STEP 0 #define SEED 256 diff --git a/src/opencl_pgpdisk_fmt_plug.c b/src/opencl_pgpdisk_fmt_plug.c index 914d631a56..e2ce30de96 100644 --- a/src/opencl_pgpdisk_fmt_plug.c +++ b/src/opencl_pgpdisk_fmt_plug.c @@ -67,7 +67,7 @@ static cl_kernel aes_kernel, twofish_kernel, cast_kernel; static cl_mem mem_in, mem_out, mem_salt; static struct fmt_main *self; -size_t insize, outsize, saltsize; +static size_t insize, outsize, saltsize; // This file contains auto-tuning routine(s). Has to be included after formats definitions. #include "opencl_autotune.h" diff --git a/src/opencl_pgpsda_fmt_plug.c b/src/opencl_pgpsda_fmt_plug.c index 9649265a2e..cb66620c37 100644 --- a/src/opencl_pgpsda_fmt_plug.c +++ b/src/opencl_pgpsda_fmt_plug.c @@ -64,7 +64,7 @@ static pgpsda_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; -size_t insize, outsize, settingsize; +static size_t insize, outsize, settingsize; // This file contains auto-tuning routine(s). Has to be included after formats definitions. #include "opencl_autotune.h" diff --git a/src/opencl_pgpwde_fmt_plug.c b/src/opencl_pgpwde_fmt_plug.c index c89b5b37b3..dccfefb6b1 100644 --- a/src/opencl_pgpwde_fmt_plug.c +++ b/src/opencl_pgpwde_fmt_plug.c @@ -68,7 +68,7 @@ static pgpwde_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize; // This file contains auto-tuning routine(s). Has to be included after formats definitions. #include "opencl_autotune.h" diff --git a/src/opencl_sappse_fmt_plug.c b/src/opencl_sappse_fmt_plug.c index 0e05d7cdc5..1bc3c16eed 100644 --- a/src/opencl_sappse_fmt_plug.c +++ b/src/opencl_sappse_fmt_plug.c @@ -71,7 +71,7 @@ static sappse_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize; #define STEP 0 #define SEED 256 diff --git a/src/opencl_ssh_fmt_plug.c b/src/opencl_ssh_fmt_plug.c index d16768622f..d2748d8c08 100644 --- a/src/opencl_ssh_fmt_plug.c +++ b/src/opencl_ssh_fmt_plug.c @@ -74,7 +74,7 @@ static ssh_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; -size_t insize, outsize, settingsize, cracked_size; +static size_t insize, outsize, settingsize; #define STEP 0 #define SEED 256 diff --git a/src/opencl_sspr_fmt_plug.c b/src/opencl_sspr_fmt_plug.c index e7969a019f..469666466f 100644 --- a/src/opencl_sspr_fmt_plug.c +++ b/src/opencl_sspr_fmt_plug.c @@ -88,7 +88,7 @@ static cl_mem mem_in, mem_out, mem_setting, mem_state; static struct fmt_main *self; static cl_kernel sspr_kernel[5], loop_kernel[5]; -size_t insize, outsize, settingsize; +static size_t insize, outsize, settingsize; #define STEP 0 #define SEED 256 diff --git a/src/opencl_tc_fmt_plug.c b/src/opencl_tc_fmt_plug.c index 47ca1be8f2..c3e7ce57cb 100644 --- a/src/opencl_tc_fmt_plug.c +++ b/src/opencl_tc_fmt_plug.c @@ -59,8 +59,8 @@ john_register_one(&FMT_STRUCT); #define MAX_KFILE_SZ 1048576 /* 1 MB */ #define MAX_KEYFILES 256 -unsigned char (*keyfiles_data)[MAX_KFILE_SZ]; -int (*keyfiles_length); +static unsigned char (*keyfiles_data)[MAX_KFILE_SZ]; +static int (*keyfiles_length); #define KEYLEN PLAINTEXT_LENGTH #define OUTLEN 64 @@ -80,7 +80,7 @@ typedef struct { unsigned int bin[(512 - 64) / 4]; } tc_salt; -struct cust_salt { +static struct cust_salt { unsigned char salt[64]; unsigned char bin[512 - 64]; int loop_inc; diff --git a/src/truecrypt_fmt_plug.c b/src/truecrypt_fmt_plug.c index 34b6e4ceb8..8b8c11701f 100644 --- a/src/truecrypt_fmt_plug.c +++ b/src/truecrypt_fmt_plug.c @@ -101,11 +101,11 @@ static unsigned char (*first_block_dec)[16]; #define MAX_KEYFILES 256 // keyfile(s) data -unsigned char (*keyfiles_data)[MAX_KFILE_SZ]; -int (*keyfiles_length); +static unsigned char (*keyfiles_data)[MAX_KFILE_SZ]; +static int (*keyfiles_length); static int *cracked; -struct cust_salt { +static struct cust_salt { unsigned char salt[64]; // I 'thought' that bin[] could be removed, so that only salt[] was used // for salt dupe-removal. That was wrong, bin[] must also be part of the