Skip to content

Commit

Permalink
Suppressing FALLTHRUGH warning on g++11 when using gcc-7 closes libge…
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Feb 5, 2018
1 parent 3fe3c03 commit 99aeda0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tests/xmltester/tinyxml/tinyxmlparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,25 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
output += *length;

// Scary scary fall throughs.
switch (*length)
switch (*length)
{
case 4:
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
/* FALLTHRU */
case 3:
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
/* FALLTHRU */
case 2:
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
/* FALLTHRU */
case 1:
--output;
--output;
*output = (char)(input | FIRST_BYTE_MARK[*length]);
}
}
Expand Down

0 comments on commit 99aeda0

Please sign in to comment.