Skip to content

Compiler warnings when building with GCC #342

Description

@Olek47

Building with GCC 16 on Linux or mingw-w64 using -Wall -Wextra -Wpedantic flags generates the following compiler warnings:

In file included from main.cpp:3:
DirectXMath/Inc/DirectXMath.h:845:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  845 |             {
      |             ^
DirectXMath/Inc/DirectXMath.h:903:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  903 |             {
      |             ^
DirectXMath/Inc/DirectXMath.h:975:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
  975 |             {
      |             ^
DirectXMath/Inc/DirectXMath.h:1043:13: warning: ISO C++ prohibits anonymous structs [-Wpedantic]
 1043 |             {
      |             ^
In file included from DirectXMath/Inc/DirectXMath.h:2372:
DirectXMath/Inc/DirectXMathMatrix.inl: In function ‘bool DirectX::XMMatrixDecompose(XMVECTOR*, XMVECTOR*, XMVECTOR*, FXMMATRIX)’:
DirectXMath/Inc/DirectXMathMatrix.inl:1165:16: warning: variable ‘aa’ set but not used [-Wunused-but-set-variable=]
 1165 |         size_t aa, bb, cc;
      |                ^~
DirectXMath/Inc/DirectXMathMatrix.inl:1165:20: warning: variable ‘bb’ set but not used [-Wunused-but-set-variable=]
 1165 |         size_t aa, bb, cc;
      |                    ^~

Clang doesn't seem to report any of these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions