diff -r 9b06054cb7b9 src/os/bsd/vm/os_bsd.cpp
--- a/src/os/bsd/vm/os_bsd.cpp	Mon Mar 10 14:50:20 2014 -0400
+++ b/src/os/bsd/vm/os_bsd.cpp	Thu Mar 13 14:13:40 2014 -0500
@@ -3759,7 +3759,10 @@
 }
 
 int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   return ::vsnprintf(buf, count, format, args);
+#pragma GCC diagnostic pop
 }
 
 // Is a (classpath) directory empty?
diff -r 9b06054cb7b9 src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp
--- a/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp	Mon Mar 10 14:50:20 2014 -0400
+++ b/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp	Thu Mar 13 14:13:40 2014 -0500
@@ -39,7 +39,10 @@
   int _cur;
 
   void vappend(const char* format, va_list ap) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
     int res = vsnprintf(&_buffer[_cur], BUFFER_LEN - _cur, format, ap);
+#pragma GCC diagnostic pop
     if (res != -1) {
       _cur += res;
     } else {
diff -r 9b06054cb7b9 src/share/vm/oops/generateOopMap.cpp
--- a/src/share/vm/oops/generateOopMap.cpp	Mon Mar 10 14:50:20 2014 -0400
+++ b/src/share/vm/oops/generateOopMap.cpp	Thu Mar 13 14:13:40 2014 -0500
@@ -2133,7 +2133,10 @@
 void GenerateOopMap::error_work(const char *format, va_list ap) {
   _got_error = true;
   char msg_buffer[512];
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   vsnprintf(msg_buffer, sizeof(msg_buffer), format, ap);
+#pragma GCC diagnostic pop
   // Append method name
   char msg_buffer2[512];
   jio_snprintf(msg_buffer2, sizeof(msg_buffer2), "%s in method %s", msg_buffer, method()->name()->as_C_string());
diff -r 9b06054cb7b9 src/share/vm/prims/jvm.cpp
--- a/src/share/vm/prims/jvm.cpp	Mon Mar 10 14:50:20 2014 -0400
+++ b/src/share/vm/prims/jvm.cpp	Thu Mar 13 14:13:40 2014 -0500
@@ -2738,7 +2738,10 @@
 int jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args) {
   // see bug 4399518, 4417214
   if ((intptr_t)count <= 0) return -1;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   return vsnprintf(str, count, fmt, args);
+#pragma GCC diagnostic pop
 }
 
 
@@ -2746,7 +2749,10 @@
   va_list args;
   int len;
   va_start(args, fmt);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   len = jio_vsnprintf(str, count, fmt, args);
+#pragma GCC diagnostic pop
   va_end(args);
   return len;
 }
@@ -2766,7 +2772,10 @@
   if (Arguments::vfprintf_hook() != NULL) {
      return Arguments::vfprintf_hook()(f, fmt, args);
   } else {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
     return vfprintf(f, fmt, args);
+#pragma GCC diagnostic pop
   }
 }
 
diff -r 9b06054cb7b9 src/share/vm/utilities/debug.cpp
--- a/src/share/vm/utilities/debug.cpp	Mon Mar 10 14:50:20 2014 -0400
+++ b/src/share/vm/utilities/debug.cpp	Thu Mar 13 14:13:40 2014 -0500
@@ -102,7 +102,10 @@
     jio_fprintf(err, "%s warning: ", VM_Version::vm_name());
     va_list ap;
     va_start(ap, format);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
     vfprintf(err, format, ap);
+#pragma GCC diagnostic pop
     va_end(ap);
     fputc('\n', err);
   }
diff -r 9b06054cb7b9 src/share/vm/utilities/exceptions.cpp
--- a/src/share/vm/utilities/exceptions.cpp	Mon Mar 10 14:50:20 2014 -0400
+++ b/src/share/vm/utilities/exceptions.cpp	Thu Mar 13 14:13:40 2014 -0500
@@ -231,7 +231,10 @@
   va_list ap;
   va_start(ap, format);
   char msg[max_msg_size];
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   vsnprintf(msg, max_msg_size, format, ap);
+#pragma GCC diagnostic pop
   msg[max_msg_size-1] = '\0';
   va_end(ap);
   _throw_msg(thread, file, line, h_name, msg);
diff -r 9b06054cb7b9 src/share/vm/utilities/ostream.cpp
--- a/src/share/vm/utilities/ostream.cpp	Mon Mar 10 14:50:20 2014 -0400
+++ b/src/share/vm/utilities/ostream.cpp	Thu Mar 13 14:13:40 2014 -0500
@@ -100,7 +100,10 @@
     result = va_arg(ap, const char*);
     result_len = strlen(result);
     if (add_cr && result_len >= buflen)  result_len = buflen-1;  // truncate
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   } else if (vsnprintf(buffer, buflen, format, ap) >= 0) {
+#pragma GCC diagnostic pop
     result = buffer;
     result_len = strlen(result);
   } else {
