summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-03-26 10:52:02 +0100
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-03-27 13:01:02 +0100
commit3714bcf395ae1146645f0f2590b914e715569bf3 (patch)
tree975db6d13c8b5793768062760065717526f546c6 /test
parenteea02140087f06b3787f9c6a7ce59f9ff71a9902 (diff)
downloadProject-Tick-3714bcf395ae1146645f0f2590b914e715569bf3.tar.gz
Project-Tick-3714bcf395ae1146645f0f2590b914e715569bf3.zip
Fix building with gcc 8.2.1 and -Wall -Wextra -pedantic -Werror
* ptrdiff_t check always failed because of unused parameter * sizeof(void *) check always failed because of double semicolon * Sign issue in nice_match assignment * dist parameter of set_bytes may be unused * Parameters of main may be unused in test/example.c * snprintf requires a _POSIX_C_SOURCE #define in test/minigzip.c, because a _POSIX_SOURCE #define is present
Diffstat (limited to 'test')
-rw-r--r--test/example.c3
-rw-r--r--test/minigzip.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/test/example.c b/test/example.c
index 7567fc5d2f..13a828b72b 100644
--- a/test/example.c
+++ b/test/example.c
@@ -538,6 +538,9 @@ int main(int argc, char *argv[])
#ifdef WITH_GZFILEOP
test_gzio((argc > 1 ? argv[1] : TESTFILE),
uncompr, uncomprLen);
+#else
+ (void)argc;
+ (void)argv;
#endif
test_deflate(compr, comprLen);
diff --git a/test/minigzip.c b/test/minigzip.c
index 3f21b1abec..e8ae9ef88f 100644
--- a/test/minigzip.c
+++ b/test/minigzip.c
@@ -15,6 +15,7 @@
/* @(#) $Id$ */
#define _POSIX_SOURCE 1 /* This file needs POSIX for fdopen(). */
+#define _POSIX_C_SOURCE 200112 /* For snprintf(). */
#include "zbuild.h"
#ifdef ZLIB_COMPAT