[PATCH 1/3] precompose_utf8: drop unused variable
From: Jeff King <hidden>
Date: 2016-06-15 23:06:45
Subsystem:
the rest · Maintainer:
Linus Torvalds
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 <redacted> --- This is obviously completely optional; I just needed it to get the "precompose on Linux" hack to build at all with my usual "-Wall -Werror" settings. I guess clang doesn't have a similar warning, or maybe people on Macs are not as pedantic as I am. compat/precompose_utf8.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index 95fe849..044c686 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
--
2.6.0.455.ga3f9923