summaryrefslogtreecommitdiff
path: root/src/houdini_html_u.c
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-02-28 03:53:49 +0100
committerKamil Rytarowski <n54@gmx.com>2016-02-28 03:54:51 +0100
commit677309d11172f59044672edf112ad3a5f2eacc21 (patch)
tree46cdadf7312cc592be9ee970c6905acffee913f4 /src/houdini_html_u.c
parente8d40d6e873f4a85696fac5da81eb9dbe7d1bc6c (diff)
Fix ctype(3) usage on NetBSD
We need to cast value passed to isspace(3) to unsigned char to explicitly prevent possibly undefined behavior. /tmp/pkgsrc-tmp/wip/cmark/work/cmark-0.24.1/src/commonmark.c: In function 'S_render_node': /tmp/pkgsrc-tmp/wip/cmark/work/cmark-0.24.1/src/commonmark.c:273:9: warning: array subscript has type 'char' [-Wchar-subscripts] (code_len > 2 && !isspace(code[0]) && ^ /tmp/pkgsrc-tmp/wip/cmark/work/cmark-0.24.1/src/commonmark.c:274:10: warning: array subscript has type 'char' [-Wchar-subscripts] !(isspace(code[code_len - 1]) && isspace(code[code_len - 2]))) && ^ /tmp/pkgsrc-tmp/wip/cmark/work/cmark-0.24.1/src/commonmark.c:274:10: warning: array subscript has type 'char' [-Wchar-subscripts] CTYPE(3) Library Functions Manual CTYPE(3) NAME isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isblank, toupper, tolower, - character classification and mapping functions LIBRARY Standard C Library (libc, -lc) CAVEATS The first argument of these functions is of type int, but only a very restricted subset of values are actually valid. The argument must either be the value of the macro EOF (which has a negative value), or must be a non-negative value within the range representable as unsigned char. Passing invalid values leads to undefined behavior. NetBSD 7.99 February 25, 2015 NetBSD 7.99
Diffstat (limited to 'src/houdini_html_u.c')
0 files changed, 0 insertions, 0 deletions