Build is broken with --enable-gcc-warnings on NetBSD.
Part of trying to track down legacy/trac#18286, neither tor nor the unit tests build with `--enable-gcc-warnings` set on NetBSD 7.0 (gcc 4.8.4) due to char subscript warnings. This gets tor to build: ``` diff --git a/src/ext/readpassphrase.c b/src/ext/readpassphrase.c index ab71935..dee474f 100644 --- a/src/ext/readpassphrase.c +++ b/src/ext/readpassphrase.c @@ -144,11 +144,11 @@ restart: if (p < end) { if ((flags & RPP_SEVENBIT)) ch &= 0x7f; - if (isalpha(ch)) { + if (isalpha((int)ch)) { if ((flags & RPP_FORCELOWER)) - ch = (char)tolower(ch); + ch = (char)tolower((int)ch); if ((flags & RPP_FORCEUPPER)) - ch = (char)toupper(ch); + ch = (char)toupper((int)ch); } *p++ = ch; } ``` The test suite fails with: ``` CC src/test/src_test_test-test_util.o ../src/test/test_util.c: In function 'test_util_format_time_interval': ../src/test/test_util.c:2347:3: error: array subscript has type 'char' [-Werror=char-subscripts] tt_ci_char_op(label_s[0],OP_EQ, 's'); ^ ../src/test/test_util.c:2354:3: error: array subscript has type 'char' [-Werror=char-subscripts] tt_ci_char_op(label_s[0],OP_EQ, 's'); [lots more use of the macro snipped] ``` I'm filing this against 0.2.8, since it's a build failure, change it if you disagree.
issue