changeset 34251:0ce22a6d7d8c

8142483: Unified logging log instances cause warnings on windows when only static functions are used Reviewed-by: brutisso, sla
author mlarsson
date Wed, 11 Nov 2015 15:45:17 +0100
parents d5b35cbe05a6
children 59d76c40998a
files hotspot/src/share/vm/logging/log.hpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
   }