mattconnolly / ZipArchive

zip archive processing for Cocoa - iPhone and OS X
http://code.google.com/p/ziparchive/
MIT License
840 stars 260 forks source link

Analyze/warnings #53

Open scottcc opened 9 years ago

scottcc commented 9 years ago

Not critical obviously but always nice to have zero warnings in your project. When I analyze, I see 3 files with a few never-read warnings:

<root>/Pods/ZipArchive/ZipArchive.m:468:17: warning: Value stored to 'success' is never read
                success = NO;
                ^         ~~
<root>/Pods/ZipArchive/ZipArchive.m:478:17: warning: Value stored to 'success' is never read
                success = NO;
                ^         ~~
<root>/Pods/ZipArchive/ZipArchive.m:508:21: warning: Value stored to 'success' is never read
                    success = NO;
                    ^         ~~
<root>/Pods/ZipArchive/ZipArchive.m:524:21: warning: Value stored to 'success' is never read
                    success = NO;

<root>/Pods/ZipArchive/minizip/unzip.c:1107:9: warning: Value stored to 'lSeek' is never read
        lSeek+=file_info.size_file_comment - uSizeRead;
        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<root>/Pods/ZipArchive/minizip/unzip.c:1110:9: warning: Value stored to 'lSeek' is never read
        lSeek+=file_info.size_file_comment;
        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
<root>/Pods/ZipArchive/minizip/unzip.c:1543:9: warning: Value stored to 'err' is never read
        err=UNZ_BADZIPFILE;
        ^   ~~~~~~~~~~~~~~

<root>/Pods/ZipArchive/minizip/zip.c:1037:7: warning: Value stored to 'err' is never read
      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2);
      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<root>/Pods/ZipArchive/minizip/zip.c:1038:7: warning: Value stored to 'err' is never read
      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);
      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<root>/Pods/ZipArchive/minizip/zip.c:1040:7: warning: Value stored to 'err' is never read
      err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);
      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<root>/Pods/ZipArchive/minizip/zip.c:1537:49: warning: Value stored to 'err' is never read
                                                err = ZIP_ERRNO;
                                                ^     ~~~~~~~~~
<root>/Pods/ZipArchive/minizip/zip.c:1682:9: warning: Value stored to 'p' is never read
        p += 8;
        ^    ~
jonasman commented 9 years ago

+1 My project has 8 static analyser warnings just because of this lib.

jonasman commented 9 years ago

There are a couple of changes in minizip repo, maybe adding that as a submodule to this would be better