Skip to content

Commit

Permalink
GCC: Added pragma to ignore fallthrough warnings within Unicode Inc. …
Browse files Browse the repository at this point in the history
…code (cuberite#4392)
  • Loading branch information
E14 authored and madmaxoft committed Sep 13, 2019
1 parent 7678d5e commit 83013d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ AString UnicodeCharToUtf8(unsigned a_UnicodeChar)



#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
// UTF-8 conversion code adapted from:
// https://stackoverflow.com/questions/2867123/convert-utf-16-to-utf-8-under-windows-and-linux-in-c

Expand Down Expand Up @@ -610,6 +614,9 @@ are equivalent to the following loop:
////////////////////////////////////////////////////////////////////////////////
// End of Unicode, Inc.'s code / information
////////////////////////////////////////////////////////////////////////////////
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif



Expand Down

0 comments on commit 83013d1

Please sign in to comment.