sgml: dismiss MSVC warnings
Brain-dead _Printf_format_string_ SAL doesn't understand utf32_t is good enough for unsigned int expected by %x placeholder. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
10f999c7bf
commit
87d678f524
@ -618,7 +618,7 @@ namespace stdex
|
||||
unicode = src[i++];
|
||||
}
|
||||
char tmp[3 + 8 + 1 + 1];
|
||||
snprintf(tmp, _countof(tmp), "&#x%x;", unicode);
|
||||
snprintf(tmp, _countof(tmp), "&#x%x;", static_cast<unsigned int>(unicode));
|
||||
dst.append(tmp);
|
||||
}
|
||||
}
|
||||
@ -760,7 +760,7 @@ namespace stdex
|
||||
unicode = src[i++];
|
||||
}
|
||||
char tmp[3 + 8 + 1 + 1];
|
||||
int m = snprintf(tmp, _countof(tmp), "&#x%x;", unicode);
|
||||
int m = snprintf(tmp, _countof(tmp), "&#x%x;", static_cast<unsigned int>(unicode));
|
||||
_Assume_(m >= 0);
|
||||
if (static_cast<size_t>(m) >= count_dst)
|
||||
throw buffer_overrun;
|
||||
|
Loading…
x
Reference in New Issue
Block a user