commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.62k stars 539 forks source link

[Clang-tidy] Narrowing data types is implementation defined #437

Open alvarogarcia7 opened 2 years ago

alvarogarcia7 commented 2 years ago

Clang-Tidy: Narrowing conversion from 'unsigned char' to signed type 'char' is implementation-defined

const unsigned char *eol;
S_is_line_end_char(*eol)

where S_is_line_end_char is defined as:

static CMARK_INLINE bool S_is_line_end_char(char c) {
  return (c == '\n' || c == '\r');
}

I'm sending a PR to fix it as well.