1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
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
|