aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>2017-01-05 19:07:54 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2017-01-05 19:07:54 +0100
commite6add210b220bd8fe56ca711279b44e111bdd8f0 (patch)
tree7a6f92b3635e748914c2c476033be19a9a8e712c
parentecba2944d576c053ec65a4cf5d8a084137cb69f8 (diff)
downloadbusybox-w32-e6add210b220bd8fe56ca711279b44e111bdd8f0.tar.gz
busybox-w32-e6add210b220bd8fe56ca711279b44e111bdd8f0.tar.bz2
busybox-w32-e6add210b220bd8fe56ca711279b44e111bdd8f0.zip
unzip: remove now-pointless lseek which returns current position
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>
-rw-r--r--archival/unzip.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/archival/unzip.c b/archival/unzip.c
index f1726439d..98a71c09d 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -268,13 +268,11 @@ static uint32_t find_cdf_offset(void)
268 268
269static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf_ptr) 269static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf_ptr)
270{ 270{
271 off_t org;
272 uint32_t magic; 271 uint32_t magic;
273 272
274 if (cdf_offset == BAD_CDF_OFFSET) 273 if (cdf_offset == BAD_CDF_OFFSET)
275 return cdf_offset; 274 return cdf_offset;
276 275
277 org = xlseek(zip_fd, 0, SEEK_CUR);
278 dbg("Reading CDF at 0x%x", (unsigned)cdf_offset); 276 dbg("Reading CDF at 0x%x", (unsigned)cdf_offset);
279 xlseek(zip_fd, cdf_offset, SEEK_SET); 277 xlseek(zip_fd, cdf_offset, SEEK_SET);
280 xread(zip_fd, &magic, 4); 278 xread(zip_fd, &magic, 4);
@@ -284,9 +282,6 @@ static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf_ptr)
284 return 0; /* EOF */ 282 return 0; /* EOF */
285 } 283 }
286 xread(zip_fd, cdf_ptr->raw, CDF_HEADER_LEN); 284 xread(zip_fd, cdf_ptr->raw, CDF_HEADER_LEN);
287 /* Caller doesn't need this: */
288 /* dbg("Returning file position to 0x%"OFF_FMT"x", org); */
289 /* xlseek(zip_fd, org, SEEK_SET); */
290 285
291 FIX_ENDIANNESS_CDF(*cdf_ptr); 286 FIX_ENDIANNESS_CDF(*cdf_ptr);
292 dbg(" file_name_length:%u extra_field_length:%u file_comment_length:%u", 287 dbg(" file_name_length:%u extra_field_length:%u file_comment_length:%u",