Browse Source

Fix some clang warnings

Panagiotis Christopoulos Charitos 7 months ago
parent
commit
cc764fdfe9

+ 4 - 4
AnKi/Config.h.cmake

@@ -203,20 +203,20 @@
 #	define ANKI_PURE
 #else
 #	define ANKI_RESTRICT
-#	define ANKI_FORCE_INLINE 
+#	define ANKI_FORCE_INLINE
 #	define ANKI_DONT_INLINE
 #	define ANKI_UNUSED
 #	define ANKI_COLD
 #	define ANKI_HOT
-#	define ANKI_UNREACHABLE() 
+#	define ANKI_UNREACHABLE()
 #	define ANKI_PREFETCH_MEMORY(addr) (void)(addr)
 #	define ANKI_CHECK_FORMAT(fmtArgIdx, firstArgIdx)
 #	define ANKI_PURE
 #endif
 
 namespace anki {
-static inline const char* kAnKiBuildConfigString = 
-"ver " ANKI_VERSION_STR 
+inline constexpr const char* kAnKiBuildConfigString =
+"ver " ANKI_VERSION_STR
 
 ", git hash " ANKI_REVISION
 

+ 2 - 2
AnKi/Gr/Common.cpp

@@ -192,7 +192,7 @@ StringList ShaderReflectionDescriptorRelated::toString() const
 	{
 		for(U32 i = 0; i < m_bindingCounts[s]; ++i)
 		{
-			list.pushBackSprintf("space: %u, register: %u, type: %u", s, m_bindings[s][i].m_registerBindingPoint, m_bindings[s][i].m_type);
+			list.pushBackSprintf("space: %u, register: %u, type: %u", s, m_bindings[s][i].m_registerBindingPoint, U32(m_bindings[s][i].m_type));
 		}
 	}
 
@@ -208,7 +208,7 @@ StringList ShaderReflection::toString() const
 
 	for(VertexAttributeSemantic attrib : EnumBitsIterable<VertexAttributeSemantic, VertexAttributeSemanticBit>(m_vertex.m_vertexAttributeMask))
 	{
-		list.pushBackSprintf("Vert attrib: %u", attrib);
+		list.pushBackSprintf("Vert attrib: %u", U32(attrib));
 	}
 
 	list.pushBackSprintf("Color RT mask: %u", m_pixel.m_colorRenderTargetWritemask.getData()[0]);

+ 1 - 1
AnKi/Resource/AccelerationStructureScratchAllocator.h

@@ -33,7 +33,7 @@ public:
 	{
 		if(size > kMaxBufferSize)
 		{
-			ANKI_RESOURCE_LOGF("Asked for too much BLAS scratch memory: %llu", size);
+			ANKI_RESOURCE_LOGF("Asked for too much BLAS scratch memory: %zu", size);
 		}
 
 		if(size > m_buffer->getSize())