summaryrefslogtreecommitdiffstats
path: root/generic/tclZipfs.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-11-06 08:02:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-11-06 08:02:01 (GMT)
commitf096016a8e791b2cc0d577bfe29ef772ef7681b7 (patch)
tree3e00032bc088a01423f439812ece6dadd954dc7c /generic/tclZipfs.c
parent5bff482dcc94aa0e11591f581384fe306477cdbe (diff)
downloadtcl-f096016a8e791b2cc0d577bfe29ef772ef7681b7.zip
tcl-f096016a8e791b2cc0d577bfe29ef772ef7681b7.tar.gz
tcl-f096016a8e791b2cc0d577bfe29ef772ef7681b7.tar.bz2
Eliminate unused variables/function-arguments
Diffstat (limited to 'generic/tclZipfs.c')
-rw-r--r--generic/tclZipfs.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index f649588..60d77f4 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -308,13 +308,11 @@ static inline int ListMountPoints(Tcl_Interp *interp);
static void SerializeCentralDirectoryEntry(
const unsigned char *start,
const unsigned char *end, unsigned char *buf,
- ZipEntry *z, size_t nameLength,
- long long dataStartOffset);
+ ZipEntry *z, size_t nameLength);
static void SerializeCentralDirectorySuffix(
const unsigned char *start,
const unsigned char *end, unsigned char *buf,
- int entryCount, long long dataStartOffset,
- long long directoryStartOffset,
+ int entryCount, long long directoryStartOffset,
long long suffixStartOffset);
static void SerializeLocalEntryHeader(
const unsigned char *start,
@@ -1191,7 +1189,7 @@ ZipFSFindTOC(
const unsigned char *p, *q;
const unsigned char *start = zf->data;
const unsigned char *end = zf->data + zf->length;
-
+
/*
* Scan backwards from the end of the file for the signature. This is
* necessary because ZIP archives aren't the only things that get tagged
@@ -1294,7 +1292,7 @@ ZipFSFindTOC(
}
zf->passOffset = minoff + zf->baseOffset;
-
+
/*
* If there's also an encoded password, extract that too (but don't decode
* yet).
@@ -3005,8 +3003,6 @@ ZipFSMkZipOrImg(
Tcl_Channel out;
int pwlen = 0, slen = 0, count, ret = TCL_ERROR, lobjc;
size_t len, i = 0;
- long long dataStartOffset; /* The overall file offset of the start of the
- * data section of the file. */
long long directoryStartOffset;
/* The overall file offset of the start of the
* central directory. */
@@ -3183,7 +3179,6 @@ ZipFSMkZipOrImg(
*/
Tcl_InitHashTable(&fileHash, TCL_STRING_KEYS);
- dataStartOffset = Tcl_Tell(out);
if (mappingList == NULL && stripPrefix != NULL) {
strip = Tcl_GetStringFromObj(stripPrefix, &slen);
if (!slen) {
@@ -3224,7 +3219,7 @@ ZipFSMkZipOrImg(
name = Tcl_UtfToExternalDString(ZipFS.utf8, z->name, -1, &ds);
len = Tcl_DStringLength(&ds);
SerializeCentralDirectoryEntry(start, end, (unsigned char *) buf,
- z, len, dataStartOffset);
+ z, len);
if ((Tcl_Write(out, buf, ZIP_CENTRAL_HEADER_LEN)
!= ZIP_CENTRAL_HEADER_LEN)
|| ((size_t) Tcl_Write(out, name, len) != len)) {
@@ -3244,7 +3239,7 @@ ZipFSMkZipOrImg(
Tcl_Flush(out);
suffixStartOffset = Tcl_Tell(out);
SerializeCentralDirectorySuffix(start, end, (unsigned char *) buf,
- count, dataStartOffset, directoryStartOffset, suffixStartOffset);
+ count, directoryStartOffset, suffixStartOffset);
if (Tcl_Write(out, buf, ZIP_CENTRAL_END_LEN) != ZIP_CENTRAL_END_LEN) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"write error: %s", Tcl_PosixError(interp)));
@@ -3401,9 +3396,7 @@ SerializeCentralDirectoryEntry(
const unsigned char *end, /* The end of writable memory. */
unsigned char *buf, /* Where to serialize to */
ZipEntry *z, /* The description of what to serialize. */
- size_t nameLength, /* The length of the name. */
- long long dataStartOffset) /* The overall file offset of the start of the
- * data section of the file. */
+ size_t nameLength) /* The length of the name. */
{
ZipWriteInt(start, end, buf + ZIP_CENTRAL_SIG_OFFS,
ZIP_CENTRAL_HEADER_SIG);
@@ -3437,8 +3430,6 @@ SerializeCentralDirectorySuffix(
const unsigned char *end, /* The end of writable memory. */
unsigned char *buf, /* Where to serialize to */
int entryCount, /* The number of entries in the directory */
- long long dataStartOffset, /* The overall file offset of the start of the
- * data section of the file. */
long long directoryStartOffset,
/* The overall file offset of the start of the
* central directory. */