summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-10-04 23:43:14 -0400
committerJunio C Hamano <gitster@pobox.com>2015-10-05 11:05:51 -0700
commite2b021eb5b5ce2f4be3c10f1f8063981b1a53053 (patch)
treed015b778b7a48433065f70ff87a97b04cb69eee6 /compat
parentac5190cc48bd75586566ccc052304d40bbc63147 (diff)
downloadgit-e2b021eb5b5ce2f4be3c10f1f8063981b1a53053.tar.gz
precompose_utf8: drop unused variable
The result of iconv is assigned to a variable, but we never use it (instead, we check errno and whether the function consumed all bytes). Let's drop the assignment, as it triggers gcc's -Wunused-but-set-variable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/precompose_utf8.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index 95fe849e42..044c68617b 100644
--- a/compat/precompose_utf8.c
+++ b/compat/precompose_utf8.c
@@ -139,9 +139,8 @@ struct dirent_prec_psx *precompose_utf8_readdir(PREC_DIR *prec_dir)
size_t inleft = namelenz;
char *outpos = &prec_dir->dirent_nfc->d_name[0];
size_t outsz = prec_dir->dirent_nfc->max_name_len;
- size_t cnt;
errno = 0;
- cnt = iconv(prec_dir->ic_precompose, &cp, &inleft, &outpos, &outsz);
+ iconv(prec_dir->ic_precompose, &cp, &inleft, &outpos, &outsz);
if (errno || inleft) {
/*
* iconv() failed and errno could be E2BIG, EILSEQ, EINVAL, EBADF