• J
    isxdigit: cast input to unsigned char · 50a71776
    Jeff King 提交于
    Otherwise, callers must do so or risk triggering warnings
    -Wchar-subscript (and rightfully so; a signed char might
    cause us to use a bogus negative index into the
    hexval_table).
    
    While we are dropping the now-unnecessary casts from the
    caller in urlmatch.c, we can get rid of similar casts in
    actually parsing the hex by using the hexval() helper, which
    implicitly casts to unsigned (but note that we cannot
    implement isxdigit in terms of hexval(), as it also casts
    its return value to unsigned).
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    50a71776
urlmatch.c 16.5 KB