From 97d9a5d9cc0fad2709dad74675a87402ea55830f Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 22 Sep 2016 11:05:04 +0200 Subject: [PATCH] Fix missing includes in folder.h Fix some warning message --- include/folder.h | 13 ++++++------- src/user_options.c | 6 +++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/folder.h b/include/folder.h index 7c7704651..6d98c92c1 100644 --- a/include/folder.h +++ b/include/folder.h @@ -4,22 +4,21 @@ */ #include +#include #include #include #include - -#if defined (_POSIX) -#include -#if defined (__APPLE__) -#include -#endif // __APPLE__ -#endif // _POSIX +#include #if defined (_POSIX) #include #include #endif +#if defined (__APPLE__) +#include +#endif // __APPLE__ + #if defined (_WIN) #include #endif diff --git a/src/user_options.c b/src/user_options.c index 56cbdbc22..0c047b71e 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -18,6 +18,8 @@ static char RULE_BUF_L[] = ":"; void user_options_init (user_options_t *user_options, int myargc, char **myargv) { + if (myargv == NULL) myargv = NULL; // because compiler warning + user_options->attack_mode = ATTACK_MODE; user_options->benchmark = BENCHMARK; user_options->bitmap_max = BITMAP_MAX; @@ -98,7 +100,7 @@ void user_options_init (user_options_t *user_options, int myargc, char **myargv) user_options->weak_hash_threshold = WEAK_HASH_THRESHOLD; user_options->workload_profile = WORKLOAD_PROFILE; user_options->rp_files_cnt = 0; - user_options->rp_files = (char **) mycalloc (myargc, sizeof (char *));; + user_options->rp_files = (char **) mycalloc (myargc, sizeof (char *)); } void user_options_destroy (user_options_t *user_options) @@ -800,6 +802,8 @@ int user_options_sanity (user_options_t *user_options, int myargc, char **myargv int user_options_extra_init (user_options_t *user_options, int myargc, char **myargv, user_options_extra_t *user_options_extra) { + if (myargv == NULL) myargv = NULL; // because compiler warning + user_options_extra->attack_kern = ATTACK_KERN_NONE; switch (user_options->attack_mode)