Skip to content

Commit 60b49b6

Browse files
committed
fix prototypes (for strict-prototypes)
1 parent d0eb2aa commit 60b49b6

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

src/crypto.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ void sqlcipher_exportFunc(sqlite3_context *, int, sqlite3_value **);
199199

200200
/* crypto_impl.c functions */
201201

202-
void sqlcipher_init_memmethods();
202+
void sqlcipher_init_memmethods(void);
203203

204204
/* activation and initialization */
205-
void sqlcipher_activate();
206-
void sqlcipher_deactivate();
205+
void sqlcipher_activate(void);
206+
void sqlcipher_deactivate(void);
207207

208208
int sqlcipher_codec_ctx_init(codec_ctx **, Db *, Pager *, sqlite3_file *, const void *, int);
209209
void sqlcipher_codec_ctx_free(codec_ctx **);
@@ -225,10 +225,10 @@ int sqlcipher_codec_ctx_get_pagesize(codec_ctx *);
225225
int sqlcipher_codec_ctx_get_reservesize(codec_ctx *);
226226

227227
void sqlcipher_set_default_pagesize(int page_size);
228-
int sqlcipher_get_default_pagesize();
228+
int sqlcipher_get_default_pagesize(void);
229229

230230
void sqlcipher_set_default_kdf_iter(int iter);
231-
int sqlcipher_get_default_kdf_iter();
231+
int sqlcipher_get_default_kdf_iter(void);
232232
int sqlcipher_codec_ctx_set_kdf_iter(codec_ctx *, int);
233233
int sqlcipher_codec_ctx_get_kdf_iter(codec_ctx *ctx);
234234

@@ -243,10 +243,10 @@ const char* sqlcipher_codec_ctx_get_cipher(codec_ctx *ctx);
243243
void* sqlcipher_codec_ctx_get_data(codec_ctx *);
244244

245245
void sqlcipher_set_default_use_hmac(int use);
246-
int sqlcipher_get_default_use_hmac();
246+
int sqlcipher_get_default_use_hmac(void);
247247

248248
void sqlcipher_set_hmac_salt_mask(unsigned char mask);
249-
unsigned char sqlcipher_get_hmac_salt_mask();
249+
unsigned char sqlcipher_get_hmac_salt_mask(void);
250250

251251
int sqlcipher_codec_ctx_set_use_hmac(codec_ctx *ctx, int use);
252252
int sqlcipher_codec_ctx_get_use_hmac(codec_ctx *ctx);
@@ -270,22 +270,22 @@ int sqlcipher_codec_hmac_sha1(const codec_ctx *ctx, const unsigned char *hmac_ke
270270
unsigned char *out);
271271

272272
int sqlcipher_set_default_plaintext_header_size(int size);
273-
int sqlcipher_get_default_plaintext_header_size();
273+
int sqlcipher_get_default_plaintext_header_size(void);
274274
int sqlcipher_codec_ctx_set_plaintext_header_size(codec_ctx *ctx, int size);
275275
int sqlcipher_codec_ctx_get_plaintext_header_size(codec_ctx *ctx);
276276

277277
int sqlcipher_set_default_hmac_algorithm(int algorithm);
278-
int sqlcipher_get_default_hmac_algorithm();
278+
int sqlcipher_get_default_hmac_algorithm(void);
279279
int sqlcipher_codec_ctx_set_hmac_algorithm(codec_ctx *ctx, int algorithm);
280280
int sqlcipher_codec_ctx_get_hmac_algorithm(codec_ctx *ctx);
281281

282282
int sqlcipher_set_default_kdf_algorithm(int algorithm);
283-
int sqlcipher_get_default_kdf_algorithm();
283+
int sqlcipher_get_default_kdf_algorithm(void);
284284
int sqlcipher_codec_ctx_set_kdf_algorithm(codec_ctx *ctx, int algorithm);
285285
int sqlcipher_codec_ctx_get_kdf_algorithm(codec_ctx *ctx);
286286

287287
void sqlcipher_set_mem_security(int);
288-
int sqlcipher_get_mem_security();
288+
int sqlcipher_get_mem_security(void);
289289

290290
int sqlcipher_find_db_index(sqlite3 *db, const char *zDb);
291291

src/crypto_cc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#include <Security/SecRandom.h>
3838
#include <CoreFoundation/CoreFoundation.h>
3939

40+
int sqlcipher_cc_setup(sqlcipher_provider *p);
41+
4042
static int sqlcipher_cc_add_random(void *ctx, void *buffer, int length) {
4143
return SQLITE_OK;
4244
}

src/malloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int sqlite3MallocInit(void){
127127
that will wipe all memory allocated by SQLite
128128
when freed */
129129
if( rc==SQLITE_OK ) {
130-
extern void sqlcipher_init_memmethods();
130+
extern void sqlcipher_init_memmethods(void);
131131
sqlcipher_init_memmethods();
132132
}
133133
#endif

src/sqlcipher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void sqlcipher_free(void *, int);
8585

8686
/* provider interfaces */
8787
int sqlcipher_register_provider(sqlcipher_provider *);
88-
sqlcipher_provider* sqlcipher_get_provider();
88+
sqlcipher_provider* sqlcipher_get_provider(void);
8989

9090
#endif
9191
#endif

0 commit comments

Comments
 (0)