Fixed a few warnings on Linux.

This commit is contained in:
LoRd_MuldeR 2020-11-04 23:17:59 +01:00
parent f889facba1
commit 9d5a103201
Signed by: mulder
GPG Key ID: 2B5913365F57E03F
4 changed files with 16 additions and 6 deletions

View File

@ -9,18 +9,23 @@
# define _GNU_SOURCE 1 # define _GNU_SOURCE 1
#endif #endif
/* Internal */
#include <slunkcrypt.h> #include <slunkcrypt.h>
#include "utils.h" #include "utils.h"
#include "crc.h" #include "crc.h"
#include "test.h" #include "test.h"
/* CRT */
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <inttypes.h> #include <inttypes.h>
#include <ctype.h> #include <ctype.h>
#include <signal.h> #include <signal.h>
/* Const */
#define BUFFER_SIZE 4096U #define BUFFER_SIZE 4096U
/* Op-mode */
#define SLUNK_MODE_HELP 0 #define SLUNK_MODE_HELP 0
#define SLUNK_MODE_VERS 1 #define SLUNK_MODE_VERS 1
#define SLUNK_MODE_ENCR 2 #define SLUNK_MODE_ENCR 2

View File

@ -10,8 +10,11 @@
# define _GNU_SOURCE 1 # define _GNU_SOURCE 1
#endif #endif
#include "utils.h" /* Internal */
#include <slunkcrypt.h> #include <slunkcrypt.h>
#include "utils.h"
/* CRT */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>

View File

@ -3,6 +3,13 @@
/* This work has been released under the CC0 1.0 Universal license! */ /* This work has been released under the CC0 1.0 Universal license! */
/******************************************************************************/ /******************************************************************************/
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN 1
# define _CRT_SECURE_NO_WARNINGS 1
#else
# define _GNU_SOURCE 1
#endif
/* Internal */ /* Internal */
#include "../include/slunkcrypt.h" #include "../include/slunkcrypt.h"
@ -13,7 +20,6 @@
/* Platform compatibility */ /* Platform compatibility */
#ifdef _WIN32 #ifdef _WIN32
# define WIN32_LEAN_AND_MEAN 1
# include <Windows.h> # include <Windows.h>
#else #else
# include <unistd.h> # include <unistd.h>

View File

@ -3,10 +3,6 @@
/* This work has been released under the CC0 1.0 Universal license! */ /* This work has been released under the CC0 1.0 Universal license! */
/******************************************************************************/ /******************************************************************************/
#ifdef _WIN32
#define _CRT_RAND_S 1
#endif
/* Internal */ /* Internal */
#include "../include/slunkcrypt.h" #include "../include/slunkcrypt.h"
#include "version.h" #include "version.h"