g-truc / glm

OpenGL Mathematics (GLM)
https://glm.g-truc.net
Other
9.05k stars 2.1k forks source link

Fix -Wall Compilation #1276 #1277

Closed christophe-lunarg closed 5 months ago

christophe-lunarg commented 5 months ago

A PR to run C.I. on https://github.com/g-truc/glm/pull/1276 because I don't know how to do it differently...

In https://github.com/g-truc/glm/issues/1263 the compilation fails because of various compiler warnings that are treated as errors. This PR eliminates (all) warnings when compiling with clang-15 and gcc-11.4.

Two notable changes that could work as standalone PR's:

In packing.inl the pointer to the data of vector types that is passed into memcpy calls is retrieved using the value_ptr() method, which is also semantically more precise. In type_ptr.inl there was a declaration of value_ptr() for vec<1, T, Q> types missing.