summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2023-05-11 09:19:55 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2023-05-11 09:19:55 +0000
commit00709f54cd8de15385e59b5c805a0444dbf0b818 (patch)
tree206d96044f81b0eded53c30315d6c7f54ec1aefe
parentbc670f8fed98cdd8a18db1becd09217d0f350db9 (diff)
downloadVirtualBox-svn-00709f54cd8de15385e59b5c805a0444dbf0b818.tar.gz
Main: More Clang 13 build fixes (warnings as errors).
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@99741 cfe28804-0f27-0410-a406-dd0f0b0b656f
-rw-r--r--src/VBox/Main/src-server/darwin/iokit.cpp4
-rw-r--r--src/libs/xpcom18a4/xpcom/string/public/nsTDependentSubstring.h4
-rw-r--r--src/libs/xpcom18a4/xpcom/string/public/nsTPromiseFlatString.h4
3 files changed, 9 insertions, 3 deletions
diff --git a/src/VBox/Main/src-server/darwin/iokit.cpp b/src/VBox/Main/src-server/darwin/iokit.cpp
index ac6974ba70a..9d50fded8c4 100644
--- a/src/VBox/Main/src-server/darwin/iokit.cpp
+++ b/src/VBox/Main/src-server/darwin/iokit.cpp
@@ -940,8 +940,8 @@ static void darwinDetermineUSBDeviceStateWorker(PUSBDEVICE pCur, io_object_t USB
if (krc != KERN_SUCCESS)
return;
- bool fUserClientOnly = true;
- bool fConfigured = false;
+ bool fUserClientOnly = true; RT_NOREF(fUserClientOnly); /* Shut up Clang 13 (-Wunused-but-set-variable). */
+ bool fConfigured = false; RT_NOREF(fConfigured);
bool fInUse = false;
bool fSeizable = true;
io_object_t Interface;
diff --git a/src/libs/xpcom18a4/xpcom/string/public/nsTDependentSubstring.h b/src/libs/xpcom18a4/xpcom/string/public/nsTDependentSubstring.h
index 00e5f189607..1cc99bcf407 100644
--- a/src/libs/xpcom18a4/xpcom/string/public/nsTDependentSubstring.h
+++ b/src/libs/xpcom18a4/xpcom/string/public/nsTDependentSubstring.h
@@ -79,7 +79,9 @@ class nsTDependentSubstring_CharT : public nsTSubstring_CharT
: substring_type(NS_CONST_CAST(char_type*, start.get()), end.get() - start.get(), F_NONE) {}
// auto-generated copy-constructor OK (XXX really?? what about base class copy-ctor?)
-
+#if RT_CLANG_PREREQ(13, 0) /* To shut up Clang 13 (-Wdeprecated-copy). */
+ nsTDependentSubstring_CharT(nsTDependentSubstring_CharT const&) = default;
+#endif
private:
// we're immutable, you can't assign into a substring
void operator=( const self_type& ) NS_DELETE;
diff --git a/src/libs/xpcom18a4/xpcom/string/public/nsTPromiseFlatString.h b/src/libs/xpcom18a4/xpcom/string/public/nsTPromiseFlatString.h
index 6899df7c261..8494b82aabd 100644
--- a/src/libs/xpcom18a4/xpcom/string/public/nsTPromiseFlatString.h
+++ b/src/libs/xpcom18a4/xpcom/string/public/nsTPromiseFlatString.h
@@ -132,6 +132,10 @@ class nsTPromiseFlatString_CharT : public nsTString_CharT
// into ourselves.
Assign(tuple);
}
+
+#if RT_CLANG_PREREQ(13, 0) /* To shut up Clang 13 (-Wdeprecated-copy). */
+ nsTPromiseFlatString_CharT(nsTPromiseFlatString_CharT const&) = default;
+#endif
};
inline