From 3fec9b8bba162fcedca41f9acece797dced1a3dd Mon Sep 17 00:00:00 2001 From: Alexander Shopov Date: Thu, 25 Jul 2019 21:05:48 +0200 Subject: [PATCH] Try to eliminate dead stores (#444) Signed-off-by: Alexander Shopov original commit: 84a6a6ab36294c73dbdc617d19c42fada42c3a15 --- LOG | 2 ++ c/compress-io.c | 2 +- c/new-io.c | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LOG b/LOG index 524bc7d48a..1e340c71b6 100644 --- a/LOG +++ b/LOG @@ -1389,3 +1389,5 @@ expeditor.c - prevent access before start of array scheme.c +- remove dead stores in files + compress-io.c, new-io.c diff --git a/c/compress-io.c b/c/compress-io.c index 376cd03876..960dfb85b5 100644 --- a/c/compress-io.c +++ b/c/compress-io.c @@ -329,7 +329,7 @@ INT S_glzclose(glzFile glz) { #ifdef EINTR if (r < 0 && errno == EINTR) continue; #endif - if (r == 0) { r = Z_ERRNO; saved_errno = errno; } + if (r == 0) { saved_errno = errno; } break; } (void)LZ4F_freeDecompressionContext(lz4->dctx); diff --git a/c/new-io.c b/c/new-io.c index 2a896c19eb..74ed098b1f 100644 --- a/c/new-io.c +++ b/c/new-io.c @@ -842,8 +842,6 @@ ptr S_bytevector_compress(ptr dest_bv, iptr d_start, iptr d_count, if (!is_valid_lz4_length(s_count)) return Sstring("source bytevector ~s is too large"); - destLen = (int)d_count; - destLen = LZ4_compress_default((char *)&BVIT(src_bv, s_start), (char *)&BVIT(dest_bv, d_start), (int)s_count, (int)d_count); if (destLen > 0)