Description
Task (REQUIRED):
The following warning appears throughout the build log, a total of 34 times, for my project. It creates some frustration when looking for warnings originating in my own code.
It would be helpful to disable this warning for this specific line. As the source is a third-party library (Sony), and presumably the team prefers to avoid modifying third-party code, it's not as easy as adding a disable warning pragma. What's the proper way to do it?
The engine includes vectormath_aos.h in three files, and bullet3d in one. These could be surrounded by pragmas. But it would likely mean that the warning returns as soon as someone includes the file in a new location without the pragmas.
Line 1: In file included from upload/myextension/src/myextension.cpp:1:
In file included from /var/extender/sdk/87b6907759f7b8dff830d54b2250b8d721bde291/defoldsdk//sdk/include/dmsdk/sdk.h:19:
In file included from /var/extender/sdk/87b6907759f7b8dff830d54b2250b8d721bde291/defoldsdk//sdk/include/dmsdk/engine/extension.h:26:
In file included from /var/extender/sdk/87b6907759f7b8dff830d54b2250b8d721bde291/defoldsdk//sdk/include/dmsdk/engine/extension.hpp:21:
In file included from /var/extender/sdk/87b6907759f7b8dff830d54b2250b8d721bde291/defoldsdk//sdk/include/dmsdk/gameobject/gameobject.h:22:
In file included from /var/extender/sdk/87b6907759f7b8dff830d54b2250b8d721bde291/defoldsdk//sdk/include/dmsdk/dlib/vmath.h:18:
In file included from /var/extender/sdk/87b6907759f7b8dff830d54b2250b8d721bde291/defoldsdk//sdk/include/dmsdk/vectormath/cpp/vectormath_aos.h:40:
private field 'd' is not used [-Wunused-private-field]
63 | float d;
| ^
/myextension/src/myextension.cpp
Line 1: private field 'd' is not used [-Wunused-private-field]
607 | float d;
| ^
Here's the offending member variable in context, from /tmp/dynamo_home/sdk/include/dmsdk/vectormath/scalar/cpp/vectormath_aos.h:
class Vector3
{
float mX;
float mY;
float mZ;
#ifndef __GNUC__
float d;
#endif
Expected outcome (REQUIRED):
- When building a project with extensions, no unused-private-field warning for
Vector3::d
appears in the build log.