Skip to content

Commit 9ddaab8

Browse files
committed
🎨 💚 Give this warning suppression a shot for CI.
1 parent 1933b65 commit 9ddaab8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/ztd/cuneicode/iso_8859_1.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,16 @@ ZTD_C_LANGUAGE_LINKAGE_I_ ZTD_CUNEICODE_API_LINKAGE_I_ cnc_mcerr cnc_mcnrtoc32n_
107107
return cnc_mcerr_insufficient_output;
108108
}
109109
}
110-
ztd_char_t __c0 = *__src;
111-
if (static_cast<unsigned char>(__c0) > 0xFFu) {
110+
ztd_char_t __c0 = *__src;
111+
unsigned char __uc0 = static_cast<unsigned char>(__c0);
112+
constexpr unsigned char __stop_warning_me = 0xFFu;
113+
if (__uc0 > __stop_warning_me) {
112114
return cnc_mcerr_invalid_sequence;
113115
}
114116
__p_src[0] += 1;
115117
__p_src_len[0] -= 1;
116118
if (!_IsCounting) {
117-
**__p_maybe_dst = static_cast<ztd_char32_t>(__c0);
119+
**__p_maybe_dst = static_cast<ztd_char32_t>(__uc0);
118120
*__p_maybe_dst += 1;
119121
}
120122
if (!_IsUnbounded) {

0 commit comments

Comments
 (0)