From 6063304cb8d73d430e7ef81c62cd9822302fcc19 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 6 Jul 2023 03:18:14 +0800 Subject: Squash some warnings (#2956) * restrict -Wno-assume to clang (gcc does not have this warning) * Add move where possible Annoyingly this warns for c++17, but will not be necessary with c++20 * Do not partially initialize struct * Remove unused variable * Silence unused var warning It is actually still referenced from an uninstantiated (for now) template * Use unused var --------- Co-authored-by: jsmall-nvidia --- source/compiler-core/slang-source-embed-util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/compiler-core') diff --git a/source/compiler-core/slang-source-embed-util.cpp b/source/compiler-core/slang-source-embed-util.cpp index ec0c005cf..45fd9c4b3 100644 --- a/source/compiler-core/slang-source-embed-util.cpp +++ b/source/compiler-core/slang-source-embed-util.cpp @@ -73,7 +73,7 @@ static bool _isHeaderExtension(const UnownedStringSlice& in) // Assume it's a header, and just use the .h extension StringBuilder buf; buf << path << toSlice(".h"); - return buf; + return std::move(buf); } /* static */SourceEmbedUtil::Style SourceEmbedUtil::getDefaultStyle(const ArtifactDesc& desc) -- cgit v1.2.3