1
0
mirror of https://github.com/leethomason/tinyxml2.git synced 2026-07-25 13:13:00 +04:00

Fix GCC 4.9.3 Build Errors

Since GCC version 4.9.3 does not support the -Wimplicit-fallthrough warning option or the __attribute__((fallthrough)) annotation,
introduce the corresponding fixes to prevent build errors.
This commit is contained in:
MattHuangGarmin
2025-11-04 14:40:21 +08:00
parent 36ff404c34
commit be7b5a107f
2 changed files with 40 additions and 3 deletions
+3 -3
View File
@@ -446,17 +446,17 @@ void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length
--output;
*output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
//fall through
TIXML_FALLTHROUGH;
case 3:
--output;
*output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
//fall through
TIXML_FALLTHROUGH;
case 2:
--output;
*output = static_cast<char>((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
//fall through
TIXML_FALLTHROUGH;
case 1:
--output;
*output = static_cast<char>(input | FIRST_BYTE_MARK[*length]);