# HG changeset patch # User Bruno Haible # Date 1548588287 -3600 # Node ID 84fd38f4932c2dcb349e23d1c4fb47bae4139db6 # Parent df1c9ad85e3ec146260e7b5ff3669b6de45925b5 tests: Fix some "unused variable" warnings. * tests/test-fts.c (fts_dealloc): Remove unused variable. * tests/unigbrk/test-uc-grapheme-breaks.c (main): Likewise. * tests/test-striconveh.c (main): Move some variable into the '#if HAVE_ICONV'. * tests/test-striconveha.c (main): Likewise. * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise. * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise. * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise. * tests/uniconv/test-u8-conv-to-enc.c (main): Likewise. * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise. * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise. * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise. * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise. * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise. * tests/uniconv/test-u8-strconv-to-enc.c (main): Likewise. * tests/uniconv/test-u16-strconv-to-enc.c (main): Likewise. * tests/uniconv/test-u32-strconv-to-enc.c (main): Likewise. * tests/test-tsearch.c (main): Move some variable into the '#if HAVE_INITSTATE'. diff -r df1c9ad85e3e -r 84fd38f4932c ChangeLog --- a/ChangeLog Sun Jan 27 12:49:12 2019 +0100 +++ b/ChangeLog Sun Jan 27 12:24:47 2019 +0100 @@ -1,3 +1,26 @@ +2019-01-27 Bruno Haible + + tests: Fix some "unused variable" warnings. + * tests/test-fts.c (fts_dealloc): Remove unused variable. + * tests/unigbrk/test-uc-grapheme-breaks.c (main): Likewise. + * tests/test-striconveh.c (main): Move some variable into the + '#if HAVE_ICONV'. + * tests/test-striconveha.c (main): Likewise. + * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise. + * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise. + * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise. + * tests/uniconv/test-u8-conv-to-enc.c (main): Likewise. + * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise. + * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise. + * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise. + * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise. + * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise. + * tests/uniconv/test-u8-strconv-to-enc.c (main): Likewise. + * tests/uniconv/test-u16-strconv-to-enc.c (main): Likewise. + * tests/uniconv/test-u32-strconv-to-enc.c (main): Likewise. + * tests/test-tsearch.c (main): Move some variable into the + '#if HAVE_INITSTATE'. + 2019-01-27 Bruno Haible unigbrk/uc-grapheme-breaks: Fix build failure. diff -r df1c9ad85e3e -r 84fd38f4932c tests/test-fts.c --- a/tests/test-fts.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/test-fts.c Sun Jan 27 12:24:47 2019 +0100 @@ -44,7 +44,6 @@ { static char dir[] = "./"; static char *const curr_dir[2] = { dir, 0 }; - FTSENT *e; FTS *ftsp = fts_open (curr_dir, FTS_NOSTAT | FTS_PHYSICAL | FTS_CWDFD, 0); if (ftsp) { diff -r df1c9ad85e3e -r 84fd38f4932c tests/test-striconveh.c --- a/tests/test-striconveh.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/test-striconveh.c Sun Jan 27 12:24:47 2019 +0100 @@ -44,6 +44,7 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t indirect; @@ -51,7 +52,6 @@ size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ iconv_t cd_ascii_to_88591 = iconv_open ("ISO-8859-1", "ASCII"); diff -r df1c9ad85e3e -r 84fd38f4932c tests/test-striconveha.c --- a/tests/test-striconveha.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/test-striconveha.c Sun Jan 27 12:24:47 2019 +0100 @@ -45,13 +45,13 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/test-tsearch.c --- a/tests/test-tsearch.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/test-tsearch.c Sun Jan 27 12:24:47 2019 +0100 @@ -264,11 +264,12 @@ main (int argc, char **argv) { int total_error = 0; - static char state[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; void *root = NULL; int i, j; #if HAVE_INITSTATE + static char state[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + initstate (SEED, state, 8); #endif diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u16-conv-from-enc.c --- a/tests/uniconv/test-u16-conv-from-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u16-conv-from-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -41,13 +41,13 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u16-conv-to-enc.c --- a/tests/uniconv/test-u16-conv-to-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u16-conv-to-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -40,13 +40,13 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u16-strconv-from-enc.c --- a/tests/uniconv/test-u16-strconv-from-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u16-strconv-from-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -29,11 +29,11 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u16-strconv-to-enc.c --- a/tests/uniconv/test-u16-strconv-to-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u16-strconv-to-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -29,11 +29,11 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u32-conv-from-enc.c --- a/tests/uniconv/test-u32-conv-from-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u32-conv-from-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -41,13 +41,13 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u32-conv-to-enc.c --- a/tests/uniconv/test-u32-conv-to-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u32-conv-to-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -40,13 +40,13 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u32-strconv-from-enc.c --- a/tests/uniconv/test-u32-strconv-from-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u32-strconv-from-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -29,11 +29,11 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u32-strconv-to-enc.c --- a/tests/uniconv/test-u32-strconv-to-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u32-strconv-to-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -28,11 +28,11 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u8-conv-from-enc.c --- a/tests/uniconv/test-u8-conv-from-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u8-conv-from-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -41,13 +41,13 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u8-conv-to-enc.c --- a/tests/uniconv/test-u8-conv-to-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u8-conv-to-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -41,13 +41,13 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; size_t o; size_t i; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u8-strconv-from-enc.c --- a/tests/uniconv/test-u8-strconv-from-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u8-strconv-from-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -29,11 +29,11 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/uniconv/test-u8-strconv-to-enc.c --- a/tests/uniconv/test-u8-strconv-to-enc.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/uniconv/test-u8-strconv-to-enc.c Sun Jan 27 12:24:47 2019 +0100 @@ -29,11 +29,11 @@ int main () { +#if HAVE_ICONV static enum iconv_ilseq_handler handlers[] = { iconveh_error, iconveh_question_mark, iconveh_escape_sequence }; size_t h; -#if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, ISO-8859-2, and UTF-8. */ diff -r df1c9ad85e3e -r 84fd38f4932c tests/unigbrk/test-uc-grapheme-breaks.c --- a/tests/unigbrk/test-uc-grapheme-breaks.c Sun Jan 27 12:49:12 2019 +0100 +++ b/tests/unigbrk/test-uc-grapheme-breaks.c Sun Jan 27 12:24:47 2019 +0100 @@ -139,8 +139,6 @@ p = line; do { - ucs4_t next; - p += strspn (p, " \t\r\n"); if (!strncmp (p, "\303\267" /* รท */, 2)) {