unzip: remove now-pointless lseek which returns current position
authorCristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Thu, 5 Jan 2017 18:07:54 +0000 (19:07 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 5 Jan 2017 18:07:54 +0000 (19:07 +0100)
archival/unzip.c: In function 'read_next_cdf':
archival/unzip.c:271:8: warning: variable 'org' set but
                                 not used [-Wunused-but-set-variable]
  off_t org;
        ^~~

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/unzip.c

index f1726439d92ec683d418f60714a837a3f913daba..98a71c09d58229967a305a2f889e024bc76f9a74 100644 (file)
@@ -268,13 +268,11 @@ static uint32_t find_cdf_offset(void)
 
 static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf_ptr)
 {
-       off_t org;
        uint32_t magic;
 
        if (cdf_offset == BAD_CDF_OFFSET)
                return cdf_offset;
 
-       org = xlseek(zip_fd, 0, SEEK_CUR);
        dbg("Reading CDF at 0x%x", (unsigned)cdf_offset);
        xlseek(zip_fd, cdf_offset, SEEK_SET);
        xread(zip_fd, &magic, 4);
@@ -284,9 +282,6 @@ static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf_ptr)
                return 0; /* EOF */
        }
        xread(zip_fd, cdf_ptr->raw, CDF_HEADER_LEN);
-       /* Caller doesn't need this: */
-       /* dbg("Returning file position to 0x%"OFF_FMT"x", org); */
-       /* xlseek(zip_fd, org, SEEK_SET); */
 
        FIX_ENDIANNESS_CDF(*cdf_ptr);
        dbg("  file_name_length:%u extra_field_length:%u file_comment_length:%u",