hotspot/src/share/vm/services/heapDumper.cpp
changeset 33604 ad1cd9269bd4
parent 33602 16053580a684
child 33606 af4ec8a4635b
--- a/hotspot/src/share/vm/services/heapDumper.cpp	Mon Oct 26 20:07:50 2015 +0100
+++ b/hotspot/src/share/vm/services/heapDumper.cpp	Fri Oct 09 16:39:37 2015 +0200
@@ -1848,7 +1848,6 @@
 }
 
 // dump the heap to given path.
-PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL
 int HeapDumper::dump(const char* path) {
   assert(path != NULL && strlen(path) > 0, "path missing");
 
@@ -1886,13 +1885,8 @@
   if (print_to_tty()) {
     timer()->stop();
     if (error() == NULL) {
-      char msg[256];
-      sprintf(msg, "Heap dump file created [%s bytes in %3.3f secs]",
-        JLONG_FORMAT, timer()->seconds());
-PRAGMA_DIAG_PUSH
-PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL
-      tty->print_cr(msg, writer.bytes_written());
-PRAGMA_DIAG_POP
+      tty->print_cr("Heap dump file created [" JLONG_FORMAT " bytes in %3.3f secs]",
+                    writer.bytes_written(), timer()->seconds());
     } else {
       tty->print_cr("Dump file is incomplete: %s", writer.error());
     }