Skip to content

Commit

Permalink
Fix newly emerged warning from clang (KhronosGroup#608)
Browse files Browse the repository at this point in the history
and a warning from a recent code change in toktx.cc.

The new clang warning has appeared, without a bump in the LLVM version number, because Emscripten releases pull the top of tree LLVM and our CI gets the latest Emscripten release. LLVM is in the final throes of developing their 15.0.0 release. 

As there is no version number change we've had to use the `__has_warning` pre-processor directive and thus modify the offending BasisU file.

Note that MS VC++ also has `__has_warning` but with a different syntax so this fix uses the directive only when `__clang__` is defined.
  • Loading branch information
MarkCallow authored Aug 3, 2022
1 parent eca5544 commit 0bdd661
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/basisu/transcoder/basisu_containers.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#elif __clang__
#if __has_warning("-Wdeprecated-builtins")
#pragma clang diagnostic ignored "-Wdeprecated-builtins"
#endif
#endif

#if defined(__linux__) && !defined(ANDROID)
Expand Down

0 comments on commit 0bdd661

Please sign in to comment.