mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6781583: Hotspot build fails on linux 64 bit platform with gcc 4.3.2
Fixed the wrong cast between types since more restrictions are imposed by gcc 4.3.2 Reviewed-by: jcoomes, acorn, phh, never
This commit is contained in:
parent
1362b9fd1d
commit
f05b009ce8
16 changed files with 76 additions and 49 deletions
|
@ -300,7 +300,10 @@ fileStream::fileStream(const char* file_name) {
|
|||
}
|
||||
|
||||
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 @@ fdStream::~fdStream() {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue