Repository navigation
Closed
Description
watchman-2.9.8 doesn't compile with -Werror on NetBSD; however, -Werror is the default except if one passes --enable-lenient.
The following warnings need fixing:
root.c: In function 'consume_kqueue':
root.c:1837:36: warning: initialization makes pointer from integer without a cast [enabled by default]
struct watchman_file *file = root->keventbuf[i].udata;
^
string.c: In function 'w_string_dup_lower':
string.c:102:5: warning: array subscript has type 'char' [-Wchar-subscripts]
if (tolower(str->buf[i]) != str->buf[i]) {
^
string.c:126:5: warning: array subscript has type 'char' [-Wchar-subscripts]
buf[i] = tolower(str->buf[i]);
^
string.c: In function 'w_string_new_lower':
string.c:154:5: warning: array subscript has type 'char' [-Wchar-subscripts]
buf[i] = tolower(str[i]);
^
string.c: In function 'w_string_equal_caseless':
string.c:202:5: warning: array subscript has type 'char' [-Wchar-subscripts]
if (tolower(a->buf[i]) != tolower(b->buf[i])) {
^
string.c:202:5: warning: array subscript has type 'char' [-Wchar-subscripts]
string.c: In function 'w_string_suffix_match':
string.c:240:5: warning: array subscript has type 'char' [-Wchar-subscripts]
if (tolower(str->buf[base + i]) != suffix->buf[i]) {
^
string.c: In function 'w_string_suffix':
string.c:267:9: warning: array subscript has type 'char' [-Wchar-subscripts]
*buf = tolower(str->buf[end]);
^
thirdparty/tap.c: In function '_gen_result':
thirdparty/tap.c:94:5: warning: array subscript has type 'char' [-Wchar-subscripts]
if(!isdigit(*c) && !isspace(*c)) {
^
thirdparty/tap.c:94:5: warning: array subscript has type 'char' [-Wchar-subscripts]
query/suffix.c: In function 'suffix_parser':
query/suffix.c:44:5: warning: array subscript has type 'char' [-Wchar-subscripts]
arg[i] = tolower(arg[i]);
^
tests/bser.c: In function 'hexdump':
tests/bser.c:34:7: warning: array subscript has type 'char' [-Wchar-subscripts]
printf("%c", isprint(start[i]) ? start[i] : '.');
^
See the CAVEATS section in
http://netbsd.gw.com/cgi-bin/man-cgi?ctype+3+NetBSD-current
for an explanation what the problem with "type 'char'" is.
Metadata
Metadata
Assignees
Labels
No labels
Activity
wez commentedon Aug 10, 2014
We don't have a NetBSD system handy to try this out and verify it.
Can you repeat this against master and submit a pull request with the obvious casts?
Thanks!
0-wiz-0 commentedon Aug 10, 2014
Thanks for the feedback. I've added casts and submitted PR #51.
(There is a travis issue on the mac system, but it doesn't look related to the actual patch.)
wez commentedon Aug 10, 2014
Thanks; we've had issues with Travis and I've just pushed a commit that I hope will clear this state.
I'll close this issue in favor of #51
Fix shell builders (#50)