]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed warning about indexing literal string in GCC macOS
authorNathan Moinvaziri <nathan@nathanm.com>
Sat, 4 Jul 2020 03:24:38 +0000 (20:24 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 14 Aug 2020 20:20:50 +0000 (22:20 +0200)
    infcover.c:378:56: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
    infcover.c:378:56: note: use array indexing to silence this warning

test/infcover.c

index 9f98bd5c3fbe833f615fcdaf2cce628001a11728..41f71508299f96f35ea125b5dec918416a05846a 100644 (file)
@@ -375,7 +375,7 @@ static void cover_support(void) {
     mem_setup(&strm);
     strm.avail_in = 0;
     strm.next_in = NULL;
-    ret = PREFIX(inflateInit_)(&strm, PREFIX2(VERSION) + 1, (int)sizeof(PREFIX3(stream)));
+    ret = PREFIX(inflateInit_)(&strm, &PREFIX2(VERSION)[1], (int)sizeof(PREFIX3(stream)));
                                                 assert(ret == Z_VERSION_ERROR);
     mem_done(&strm, "wrong version");