Mercurial > hg > truffle
comparison src/share/vm/utilities/ostream.cpp @ 513:2328d1d3f8cf
6781583: Hotspot build fails on linux 64 bit platform with gcc 4.3.2
Summary: Fixed the wrong cast between types since more restrictions are imposed by gcc 4.3.2
Reviewed-by: jcoomes, acorn, phh, never
author | xlu |
---|---|
date | Wed, 24 Dec 2008 19:13:53 -0800 |
parents | 1ee8caae33af |
children | 0fbdb4381b99 |
comparison
equal
deleted
inserted
replaced
512:db4caa99ef11 | 513:2328d1d3f8cf |
---|---|
298 _file = fopen(file_name, "w"); | 298 _file = fopen(file_name, "w"); |
299 _need_close = true; | 299 _need_close = true; |
300 } | 300 } |
301 | 301 |
302 void fileStream::write(const char* s, size_t len) { | 302 void fileStream::write(const char* s, size_t len) { |
303 if (_file != NULL) fwrite(s, 1, len, _file); | 303 if (_file != NULL) { |
304 // Make an unused local variable to avoid warning from gcc 4.x compiler. | |
305 size_t count = fwrite(s, 1, len, _file); | |
306 } | |
304 update_position(s, len); | 307 update_position(s, len); |
305 } | 308 } |
306 | 309 |
307 fileStream::~fileStream() { | 310 fileStream::~fileStream() { |
308 if (_file != NULL) { | 311 if (_file != NULL) { |
326 _fd = -1; | 329 _fd = -1; |
327 } | 330 } |
328 } | 331 } |
329 | 332 |
330 void fdStream::write(const char* s, size_t len) { | 333 void fdStream::write(const char* s, size_t len) { |
331 if (_fd != -1) ::write(_fd, s, (int)len); | 334 if (_fd != -1) { |
335 // Make an unused local variable to avoid warning from gcc 4.x compiler. | |
336 size_t count = ::write(_fd, s, (int)len); | |
337 } | |
332 update_position(s, len); | 338 update_position(s, len); |
333 } | 339 } |
334 | 340 |
335 defaultStream* defaultStream::instance = NULL; | 341 defaultStream* defaultStream::instance = NULL; |
336 int defaultStream::_output_fd = 1; | 342 int defaultStream::_output_fd = 1; |