diff --git a/filament/backend/include/private/backend/CommandStream.h b/filament/backend/include/private/backend/CommandStream.h index df1fb78a08..9a528d7401 100644 --- a/filament/backend/include/private/backend/CommandStream.h +++ b/filament/backend/include/private/backend/CommandStream.h @@ -205,12 +205,12 @@ public: // ------------------------------------------------------------------------------------------------ -#ifdef NDEBUG - #define DEBUG_COMMAND(methodName, params...) +#if defined(NDEBUG) + #define DEBUG_COMMAND(methodName, ...) #else // For now, simply pass the method name down as a string and throw away the parameters. // This is good enough for certain debugging needs and we can improve this later. - #define DEBUG_COMMAND(methodName, params...) mDriver->debugCommand(#methodName) + #define DEBUG_COMMAND(methodName, ...) mDriver->debugCommand(#methodName) #endif class CommandStream { diff --git a/filament/backend/src/opengl/OpenGLDriver.h b/filament/backend/src/opengl/OpenGLDriver.h index 6f80af8b7d..c756654984 100644 --- a/filament/backend/src/opengl/OpenGLDriver.h +++ b/filament/backend/src/opengl/OpenGLDriver.h @@ -475,8 +475,8 @@ private: } pack; struct { - vec4gli scissor = 0; - vec4gli viewport = 0; + vec4gli scissor { 0 }; + vec4gli viewport { 0 }; } window; struct { diff --git a/libs/ibl/src/CubemapIBL.cpp b/libs/ibl/src/CubemapIBL.cpp index 404bc2819a..ca1038b246 100644 --- a/libs/ibl/src/CubemapIBL.cpp +++ b/libs/ibl/src/CubemapIBL.cpp @@ -764,7 +764,7 @@ static float2 DFV(float NoV, float linearRoughness, size_t numSamples) { r.y += v * Fc; } } - return r * (4.0 / numSamples); + return r * (4.0f / numSamples); } static float2 DFV_Multiscatter(float NoV, float linearRoughness, size_t numSamples) { @@ -809,7 +809,7 @@ static float2 DFV_Multiscatter(float NoV, float linearRoughness, size_t numSampl r.y += v; } } - return r * (4.0 / numSamples); + return r * (4.0f / numSamples); } static float UTILS_UNUSED DFV_LazanyiTerm(float NoV, float linearRoughness, size_t numSamples) { diff --git a/libs/math/dummy.cpp b/libs/math/dummy.cpp index a4e2d4ba3e..3a6c9c21f3 100644 --- a/libs/math/dummy.cpp +++ b/libs/math/dummy.cpp @@ -15,6 +15,8 @@ */ // Empty symbol used to suppress warnings on Darwin -__attribute__((visibility("hidden"))) +#if __has_attribute(visibility) + __attribute__((visibility("hidden"))) +#endif void e() { } diff --git a/libs/utils/include/utils/StructureOfArrays.h b/libs/utils/include/utils/StructureOfArrays.h index 61fa958476..44240d72aa 100644 --- a/libs/utils/include/utils/StructureOfArrays.h +++ b/libs/utils/include/utils/StructureOfArrays.h @@ -166,7 +166,7 @@ public: template class Iterator { friend class StructureOfArraysBase; - CVQualifiedSOAPointer UTILS_RESTRICT soa; + CVQualifiedSOAPointer soa; // don't use restrict, can have aliases if multiple iterators are created size_t index; Iterator(CVQualifiedSOAPointer soa, size_t index) : soa(soa), index(index) {} diff --git a/samples/app/FilamentApp.cpp b/samples/app/FilamentApp.cpp index b2d5c528a6..f12a6977d0 100644 --- a/samples/app/FilamentApp.cpp +++ b/samples/app/FilamentApp.cpp @@ -677,7 +677,7 @@ void FilamentApp::Window::configureCamerasForWindow() { FilamentApp::CView::CView(Renderer& renderer, std::string name) : engine(*renderer.getEngine()), mName(name) { view = engine.createView(); - view->setClearColor({ 0 }); + view->setClearColor(LinearColorA{ 0 }); view->setName(name.c_str()); } diff --git a/samples/app/IcoSphere.cpp b/samples/app/IcoSphere.cpp index 62e40eb1c7..3cfaa65d81 100644 --- a/samples/app/IcoSphere.cpp +++ b/samples/app/IcoSphere.cpp @@ -46,7 +46,7 @@ IcoSphere::Index IcoSphere::vertex_for_edge( std::swap(key.first, key.second); } - auto inserted = lookup.insert({ key, vertices.size() }); + auto inserted = lookup.insert({ key, (Lookup::mapped_type)vertices.size() }); if (inserted.second) { auto edge0 = vertices[first]; auto edge1 = vertices[second];