summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-archive-file-system.cpp1
-rw-r--r--source/core/slang-com-object.h13
-rw-r--r--source/core/slang-deflate-compression-system.cpp2
-rw-r--r--source/core/slang-lz4-compression-system.cpp1
-rw-r--r--source/core/slang-smart-pointer.h2
5 files changed, 11 insertions, 8 deletions
diff --git a/source/core/slang-archive-file-system.cpp b/source/core/slang-archive-file-system.cpp
index 8c4d0ef2d..0d998c849 100644
--- a/source/core/slang-archive-file-system.cpp
+++ b/source/core/slang-archive-file-system.cpp
@@ -96,6 +96,7 @@ void ImplicitDirectoryCollector::addRemainingPath(SlangPathType pathType, const
}
const Index countIndex = m_map.findOrAdd(pathRemainder, pathType);
+ SLANG_UNUSED(countIndex);
// Make sure they are the same type
SLANG_ASSERT(SlangPathType(m_map.getValueAt(countIndex)) == pathType);
}
diff --git a/source/core/slang-com-object.h b/source/core/slang-com-object.h
index ad4578585..50dac5ba2 100644
--- a/source/core/slang-com-object.h
+++ b/source/core/slang-com-object.h
@@ -15,12 +15,13 @@ public:
ComObject()
: comRefCount(0)
{}
- ComObject(const ComObject&) : comRefCount(0) {}
- ComObject& operator=(const ComObject&)
- {
- comRefCount = 0;
- return *this;
- };
+ ComObject(const ComObject& rhs) :
+ RefObject(rhs),
+ comRefCount(0)
+ {}
+
+ ComObject& operator=(const ComObject&) { return *this; }
+
virtual void comFree() {}
uint32_t addRefImpl()
diff --git a/source/core/slang-deflate-compression-system.cpp b/source/core/slang-deflate-compression-system.cpp
index dab6654f7..6c75de9e4 100644
--- a/source/core/slang-deflate-compression-system.cpp
+++ b/source/core/slang-deflate-compression-system.cpp
@@ -50,7 +50,7 @@ SlangResult DeflateCompressionSystemImpl::compress(const CompressionStyle* style
size_t compressedSizeInBytes;
const int flags = 0;
- void* compressed = tdefl_compress_mem_to_heap(src, srcSizeInBytes, &compressedSizeInBytes, 0);
+ void* compressed = tdefl_compress_mem_to_heap(src, srcSizeInBytes, &compressedSizeInBytes, flags);
if (!compressed)
{
diff --git a/source/core/slang-lz4-compression-system.cpp b/source/core/slang-lz4-compression-system.cpp
index fd360ce2e..4b8661534 100644
--- a/source/core/slang-lz4-compression-system.cpp
+++ b/source/core/slang-lz4-compression-system.cpp
@@ -56,6 +56,7 @@ SlangResult LZ4CompressionSystemImpl::compress(const CompressionStyle* style, co
SlangResult LZ4CompressionSystemImpl::decompress(const void* compressed, size_t compressedSizeInBytes, size_t decompressedSizeInBytes, void* outDecompressed)
{
const int decompressedSize = LZ4_decompress_safe((const char*)compressed, (char*)outDecompressed, int(compressedSizeInBytes), int(decompressedSizeInBytes));
+ SLANG_UNUSED(decompressedSize);
SLANG_ASSERT(size_t(decompressedSize) == decompressedSizeInBytes);
return SLANG_OK;
}
diff --git a/source/core/slang-smart-pointer.h b/source/core/slang-smart-pointer.h
index a6aa35906..c473cca3c 100644
--- a/source/core/slang-smart-pointer.h
+++ b/source/core/slang-smart-pointer.h
@@ -24,7 +24,7 @@ namespace Slang
: referenceCount(0)
{}
- RefObject& operator=(const RefObject& rhs) = default;
+ RefObject& operator=(const RefObject&) { return *this; }
virtual ~RefObject()
{}