BAN-AI-Communications/k95-mingw

View on GitHub
zlib-1.2.8/contrib/minizip/zip.c

Summary

Maintainability
Test Coverage

Showing 30 of 30 total issues

Identical inner if condition is always true.
Open

if(zi->ci.method == Z_DEFLATED)
zlib-1.2.8/contrib/minizip/zip.c on lines 1209..1209

TODO found
Open

// TODO..
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by fixme

Too many #ifdef configurations - cppcheck only checks 12 of 15 configurations. Use --force to check all configurations.
Open

}
Severity: Info
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The scope of the variable dataSize can be reduced.
Open

short dataSize;
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Variable err is reassigned a value before the old one has been used.
Open

err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8);
zlib-1.2.8/contrib/minizip/zip.c on lines 1040..1040

Variable p is assigned a value that is never used.
Open

p += 8;
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Variable bBreak is modified but its new value is never used.
Open

bBreak++;
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Variable err is reassigned a value before the old one has been used.
Open

err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);
zlib-1.2.8/contrib/minizip/zip.c on lines 1037..1037

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Variable err is reassigned a value before the old one has been used.
Open

err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);
zlib-1.2.8/contrib/minizip/zip.c on lines 1038..1038

Variable err is reassigned a value before the old one has been used.
Open

err=deflate(&zi->ci.stream, Z_FINISH);
zlib-1.2.8/contrib/minizip/zip.c on lines 1538..1538

The scope of the variable header can be reduced.
Open

short header;
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Variable err is reassigned a value before the old one has been used.
Open

err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH);
zlib-1.2.8/contrib/minizip/zip.c on lines 1557..1557

Redundant pointer operation on pzlib_filefunc_def - it`s already a pointer.
Open

if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

Condition password!=NULL is always false
Open

if (password != NULL)
zlib-1.2.8/contrib/minizip/zip.c on lines 1071..1071

The function zipOpen is never used.
Open

extern zipFile ZEXPORT zipOpen (const char* pathname, int append)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipOpenNewFileInZip64 is never used.
Open

extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipOpenNewFileInZip is never used.
Open

extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi,
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipOpenNewFileInZip4 is never used.
Open

extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipOpenNewFileInZip2_64 is never used.
Open

extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipOpen2 is never used.
Open

extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipRemoveExtraInfoBlock is never used.
Open

extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader)
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipOpenNewFileInZip2 is never used.
Open

extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi,
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

The function zipOpenNewFileInZip3 is never used.
Open

extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
Severity: Minor
Found in zlib-1.2.8/contrib/minizip/zip.c by cppcheck

There are no issues that match your filters.

Category
Status