mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
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:
parent
9cef6c9d3f
commit
e476b0eace
@ -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.
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user