Squash MSVC warning "local variable 'fd' used without having

been initialized".


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9631 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-02-15 11:04:40 +00:00
parent 9cef6c9d3f
commit e476b0eace
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2005-02-15 Angus Leeming <leeming@lyx.org>
* lyxserver.C (startPipe): squash MSVC warning "local variable
'fd' used without having been initialized".
2005-02-14 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* BufferView_pimpl.C: revert accidental commit.

View File

@ -147,8 +147,6 @@ void LyXComm::closeConnection()
int LyXComm::startPipe(string const & filename, bool write)
{
int fd;
#ifdef __EMX__
HPIPE os2fd;
APIRET rc;
@ -181,7 +179,7 @@ int LyXComm::startPipe(string const & filename, bool write)
};
// Imported handles can be used both with OS/2 APIs and emx
// library functions.
fd = _imphandle(os2fd);
int const fd = _imphandle(os2fd);
#else
if (::access(filename.c_str(), F_OK) == 0) {
lyxerr << "LyXComm: Pipe " << filename << " already exists.\n"
@ -196,7 +194,8 @@ int LyXComm::startPipe(string const & filename, bool write)
<< strerror(errno) << endl;
return -1;
};
fd = ::open(filename.c_str(), write ? (O_RDWR) : (O_RDONLY|O_NONBLOCK));
int const fd = ::open(filename.c_str(),
write ? (O_RDWR) : (O_RDONLY|O_NONBLOCK));
#endif
if (fd < 0) {