Interpreting the information from this cppreference page, specifically in the "Conditional Operator" section, subsections (3) and (1), we see:
(3) Performs a conversion from the result of the evaluation to the
common type, defined as follows:
(1) if the expressions have arithmetic
type, the common type is the type after usual arithmetic conversions
Then, looking at the linked "usual arithmetic conversions", we see:
(4) Otherwise, both operands are integers. Both operands undergo
integer promotions (see below); then, ...
Those integer promotions will cause both expressions to be promoted to int types - even if you explicitly cast the second, as in char c = len != 0 ? char_ptr[0] : (char)'\0';.
So, in order to silence the warning, the result of the conditional expression (which will be of int type) needs to be cast to a char, as in:
char c = (char)(len != 0 ? char_ptr[0] : '\0');
From this Draft C11 Standard
6.5.15 Conditional Operator
...
5 If both the second and third operands have arithmetic type, the result type that would be determined by the
usual arithmetic conversions, were they applied to those two operands,
is the type of the result.
Which appears to confirm the information presented by cppreference.com.