Commit cb3836db authored by Florian Oetke's avatar Florian Oetke
Browse files

fixed errors reported by scan-build

parent 9d7d783c
......@@ -1028,7 +1028,7 @@ static int zip_parse_end_of_central_dir(void *in, ZIPinfo *info,
{
PHYSFS_uint32 ui32;
PHYSFS_uint16 ui16;
PHYSFS_sint64 len;
PHYSFS_sint64 len = 0;
PHYSFS_sint64 pos;
/* find the end-of-central-dir record, and seek to it. */
......
......@@ -1123,7 +1123,7 @@ SZ_RESULT SzReadAndDecodePackedStreams2(
{
UInt32 numUnPackStreams = 0;
CFileSize dataStartPos;
CFileSize dataStartPos = 0;
CFolder *folder;
#ifndef _LZMA_IN_CB
CFileSize packSize = 0;
......
......@@ -171,17 +171,19 @@ static char *findBinaryInPath(const char *bin, char *envr)
exe = x;
} /* if */
/* build full binary path... */
strcpy(exe, start);
if ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/'))
strcat(exe, "/");
strcat(exe, bin);
if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */
{
strcpy(exe, start); /* i'm lazy. piss off. */
return(exe);
} /* if */
if(exe) {
/* build full binary path... */
strcpy(exe, start);
if ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/'))
strcat(exe, "/");
strcat(exe, bin);
if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */
{
strcpy(exe, start); /* i'm lazy. piss off. */
return(exe);
} /* if */
}
start = ptr + 1; /* start points to beginning of next element. */
} while (ptr != NULL);
......
......@@ -350,6 +350,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
INSERT_STRING(s, n, hash_head);
}
if (hash_head) hash_head = 0; /* to make compiler happy */
(void) hash_head;
return Z_OK;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment