hotspot/src/share/vm/utilities/ostream.cpp
changeset 1889 24b003a6fe46
parent 1388 3677f5f3d66b
child 2105 347008ce7984
--- a/hotspot/src/share/vm/utilities/ostream.cpp	Wed Dec 24 13:06:09 2008 -0800
+++ b/hotspot/src/share/vm/utilities/ostream.cpp	Wed Dec 24 19:13:53 2008 -0800
@@ -300,7 +300,10 @@
 }
 
 void fileStream::write(const char* s, size_t len) {
-  if (_file != NULL)  fwrite(s, 1, len, _file);
+  if (_file != NULL)  {
+    // Make an unused local variable to avoid warning from gcc 4.x compiler.
+    size_t count = fwrite(s, 1, len, _file);
+  }
   update_position(s, len);
 }
 
@@ -328,7 +331,10 @@
 }
 
 void fdStream::write(const char* s, size_t len) {
-  if (_fd != -1) ::write(_fd, s, (int)len);
+  if (_fd != -1) {
+    // Make an unused local variable to avoid warning from gcc 4.x compiler.
+    size_t count = ::write(_fd, s, (int)len);
+  }
   update_position(s, len);
 }