hotspot/src/share/vm/utilities/debug.cpp
changeset 6967 c5ebdcf8372e
parent 6445 64694b1e56e7
child 7397 5b173b4ca846
--- a/hotspot/src/share/vm/utilities/debug.cpp	Thu Oct 07 15:14:41 2010 -0400
+++ b/hotspot/src/share/vm/utilities/debug.cpp	Tue Oct 12 10:57:33 2010 -0400
@@ -51,14 +51,16 @@
 
 
 void warning(const char* format, ...) {
-  // In case error happens before init or during shutdown
-  if (tty == NULL) ostream_init();
+  if (PrintWarnings) {
+    // In case error happens before init or during shutdown
+    if (tty == NULL) ostream_init();
 
-  tty->print("%s warning: ", VM_Version::vm_name());
-  va_list ap;
-  va_start(ap, format);
-  tty->vprint_cr(format, ap);
-  va_end(ap);
+    tty->print("%s warning: ", VM_Version::vm_name());
+    va_list ap;
+    va_start(ap, format);
+    tty->vprint_cr(format, ap);
+    va_end(ap);
+  }
   if (BreakAtWarning) BREAKPOINT;
 }