NVHTarGzip icon indicating copy to clipboard operation
NVHTarGzip copied to clipboard

xcode 8 - ios 9.3 - compiler warnings

Open MavEtJu opened this issue 7 years ago • 1 comments

gzFile is already a "struct gzsomething *", so it shouldn't be "gzFile *".

--- a/Geocube/NVHTarGzip/NVHGzipFile.m
+++ b/Geocube/NVHTarGzip/NVHGzipFile.m
@@ -103,7 +103,7 @@ - (NSInteger)inflateGzip:(NSString *)sourcePath
        // Convert source path into something a C library can handle
        const char *sourceCString = [sourcePath cStringUsingEncoding:NSASCIIStringEncoding];
     
-       gzFile *sourceGzFile = gzopen(sourceCString, "rb");
+       gzFile sourceGzFile = gzopen(sourceCString, "rb");
     
        unsigned int bufferLength = 1024*256;   //Thats like 256Kb
        void *buffer = malloc(bufferLength);
@@ -221,7 +221,7 @@ - (NSInteger)deflateToGzip:(NSString *)destinationPath
     // Convert destination path into something a C library can handle
     const char *destinationCString = [destinationPath cStringUsingEncoding:NSASCIIStringEncoding];
     
-    gzFile *destinationGzFile = gzopen(destinationCString, "wb");
+    gzFile destinationGzFile = gzopen(destinationCString, "wb");
     
     unsigned int bufferLength = 1024*256;      //Thats like 256Kb
     void *buffer = malloc(bufferLength);

MavEtJu avatar May 14 '17 11:05 MavEtJu

I'm not actively maintaining this project, but If you submit a PR, I'd happily merge it.

nvh avatar May 15 '17 07:05 nvh