mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Support/raw_ostream: Fix uninitalized variable in raw_fd_ostream constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123643 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0d1941a46f
commit
2634a5425c
@ -433,6 +433,13 @@ raw_fd_ostream::raw_fd_ostream(int fd, bool shouldClose, bool unbuffered)
|
||||
if (fd == STDOUT_FILENO || fd == STDERR_FILENO)
|
||||
setmode(fd, O_BINARY);
|
||||
#endif
|
||||
|
||||
// Get the starting position.
|
||||
off_t loc = ::lseek(FD, 0, SEEK_CUR);
|
||||
if (loc == (off_t)-1)
|
||||
pos = 0;
|
||||
else
|
||||
pos = static_cast<uint64_t>(loc);
|
||||
}
|
||||
|
||||
raw_fd_ostream::~raw_fd_ostream() {
|
||||
|
Loading…
Reference in New Issue
Block a user