src/share/vm/prims/jvm.cpp

Print this page

        

@@ -2473,11 +2473,12 @@
 void jio_print(const char* s) {
   // Try to make this function as atomic as possible.
   if (Arguments::vfprintf_hook() != NULL) {
     jio_fprintf(defaultStream::output_stream(), "%s", s);
   } else {
-    ::write(defaultStream::output_fd(), s, (int)strlen(s));
+    // Make an unused local variable to avoid warning from gcc 4.x compiler.
+    size_t count = ::write(defaultStream::output_fd(), s, (int)strlen(s));
   }
 }
 
 } // Extern C