8142483: Unified logging log instances cause warnings on windows when only static functions are used
authormlarsson
Wed, 11 Nov 2015 15:45:17 +0100
changeset 34251 0ce22a6d7d8c
parent 34250 d5b35cbe05a6
child 34252 59d76c40998a
8142483: Unified logging log instances cause warnings on windows when only static functions are used Reviewed-by: brutisso, sla
hotspot/src/share/vm/logging/log.hpp
--- a/hotspot/src/share/vm/logging/log.hpp	Fri Nov 20 19:17:57 2015 +0000
+++ b/hotspot/src/share/vm/logging/log.hpp	Wed Nov 11 15:45:17 2015 +0100
@@ -88,6 +88,11 @@
   // is not __NO_TAG, the number of tags given exceeds the maximum allowed.
   STATIC_ASSERT(GuardTag == LogTag::__NO_TAG); // Number of logging tags exceeds maximum supported!
 
+  // Empty constructor to avoid warnings on MSVC about unused variables
+  // when the log instance is only used for static functions.
+  Log() {
+  }
+
   static bool is_level(LogLevelType level) {
     return LogTagSetMapping<T0, T1, T2, T3, T4>::tagset().is_level(level);
   }