diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2009-11-09 01:13:29 -0500 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2009-11-09 01:13:29 -0500 |
commit | f90a98eec82ee0dd2397d0c40174ba372a6d2bdc (patch) | |
tree | 29dc7cfee7ab38ed840bc5869788bf772252968c /libarchive/archive_write_set_format_cpio_newc.c | |
parent | bafc3c6b7dfb0028b92c8a1653d6833f85d84e14 (diff) | |
download | libarchive-f90a98eec82ee0dd2397d0c40174ba372a6d2bdc.tar.gz |
- Value stored to 'ret' is never read.
- Value stored to 'cpio' is never read.
- Although the value stored to 'v' is used in the enclosing expression,
the value is never actually read from 'v'.
Found by Clang Static Analyzer.
SVN-Revision: 1615
Diffstat (limited to 'libarchive/archive_write_set_format_cpio_newc.c')
-rw-r--r-- | libarchive/archive_write_set_format_cpio_newc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libarchive/archive_write_set_format_cpio_newc.c b/libarchive/archive_write_set_format_cpio_newc.c index 06805cfd..7230a71d 100644 --- a/libarchive/archive_write_set_format_cpio_newc.c +++ b/libarchive/archive_write_set_format_cpio_newc.c @@ -238,17 +238,15 @@ format_hex_recursive(int64_t v, char *p, int s) return (v); v = format_hex_recursive(v, p+1, s-1); *p = "0123456789abcdef"[v & 0xf]; - return (v >>= 4); + return (v >> 4); } static int archive_write_newc_finish(struct archive_write *a) { - struct cpio *cpio; int er; struct archive_entry *trailer; - cpio = (struct cpio *)a->format_data; trailer = archive_entry_new(); archive_entry_set_nlink(trailer, 1); archive_entry_set_pathname(trailer, "TRAILER!!!"); @@ -275,7 +273,6 @@ archive_write_newc_finish_entry(struct archive_write *a) int to_write, ret; cpio = (struct cpio *)a->format_data; - ret = ARCHIVE_OK; while (cpio->entry_bytes_remaining > 0) { to_write = cpio->entry_bytes_remaining < a->null_length ? cpio->entry_bytes_remaining : a->null_length; |