diff --git a/lib/arch/CArchDaemonUnix.cpp b/lib/arch/CArchDaemonUnix.cpp index 93d50d4d..8d4c0c87 100644 --- a/lib/arch/CArchDaemonUnix.cpp +++ b/lib/arch/CArchDaemonUnix.cpp @@ -19,6 +19,7 @@ #include #include #include +#include // // CArchDaemonUnix @@ -37,6 +38,8 @@ CArchDaemonUnix::~CArchDaemonUnix() int CArchDaemonUnix::daemonize(const char* name, DaemonFunc func) { + int dummy; + // fork so shell thinks we're done and so we're not a process // group leader switch (fork()) { @@ -57,7 +60,7 @@ CArchDaemonUnix::daemonize(const char* name, DaemonFunc func) setsid(); // chdir to root so we don't keep mounted filesystems points busy - chdir("/"); + dummy = chdir("/"); // mask off permissions for any but owner umask(077); @@ -71,7 +74,7 @@ CArchDaemonUnix::daemonize(const char* name, DaemonFunc func) // of standard I/O safely goes in the bit bucket. open("/dev/null", O_RDONLY); open("/dev/null", O_RDWR); - dup(1); + dummy = dup(1); // invoke function return func(1, &name); diff --git a/lib/arch/CArchNetworkBSD.cpp b/lib/arch/CArchNetworkBSD.cpp index af474e86..fe6acdbb 100644 --- a/lib/arch/CArchNetworkBSD.cpp +++ b/lib/arch/CArchNetworkBSD.cpp @@ -316,8 +316,10 @@ CArchNetworkBSD::pollSocket(CPollEntry pe[], int num, double timeout) if (n > 0 && unblockPipe != NULL && (pfd[num].revents & POLLIN) != 0) { // the unblock event was signalled. flush the pipe. char dummy[100]; + int ignore; + do { - read(unblockPipe[0], dummy, sizeof(dummy)); + ignore = read(unblockPipe[0], dummy, sizeof(dummy)); } while (errno != EAGAIN); // don't count this unblock pipe in return value @@ -489,7 +491,9 @@ CArchNetworkBSD::unblockPollSocket(CArchThread thread) const int* unblockPipe = getUnblockPipeForThread(thread); if (unblockPipe != NULL) { char dummy = 0; - write(unblockPipe[1], &dummy, 1); + int ignore; + + ignore = write(unblockPipe[1], &dummy, 1); } } diff --git a/lib/arch/CMultibyte.cpp b/lib/arch/CMultibyte.cpp index 517d72d6..81999ed9 100644 --- a/lib/arch/CMultibyte.cpp +++ b/lib/arch/CMultibyte.cpp @@ -17,8 +17,9 @@ #include "common.h" #include "CArch.h" -#include -#include +#include +#include +#include #if HAVE_LOCALE_H # include #endif @@ -26,7 +27,7 @@ # include #elif __APPLE__ // wtf? Darwin puts mbtowc() et al. in stdlib -# include +# include #else // platform apparently has no wchar_t support. provide dummy // implementations. hopefully at least the C++ compiler has diff --git a/lib/arch/XArchUnix.cpp b/lib/arch/XArchUnix.cpp index 6f4047d5..6779f3a5 100644 --- a/lib/arch/XArchUnix.cpp +++ b/lib/arch/XArchUnix.cpp @@ -13,7 +13,7 @@ */ #include "XArchUnix.h" -#include +#include // // XArchEvalUnix diff --git a/lib/base/CStringUtil.cpp b/lib/base/CStringUtil.cpp index 46361932..0ef1df42 100644 --- a/lib/base/CStringUtil.cpp +++ b/lib/base/CStringUtil.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include // diff --git a/lib/base/CUnicode.cpp b/lib/base/CUnicode.cpp index 4dcfcd6f..6daf28ec 100644 --- a/lib/base/CUnicode.cpp +++ b/lib/base/CUnicode.cpp @@ -14,7 +14,7 @@ #include "CUnicode.h" #include "CArch.h" -#include +#include // // local utility functions diff --git a/lib/client/CClient.cpp b/lib/client/CClient.cpp index 1e450a17..8f0c29c8 100644 --- a/lib/client/CClient.cpp +++ b/lib/client/CClient.cpp @@ -26,6 +26,8 @@ #include "CLog.h" #include "IEventQueue.h" #include "TMethodEventJob.h" +#include +#include // // CClient diff --git a/lib/client/CServerProxy.cpp b/lib/client/CServerProxy.cpp index acef43b2..f82fb01b 100644 --- a/lib/client/CServerProxy.cpp +++ b/lib/client/CServerProxy.cpp @@ -24,6 +24,7 @@ #include "TMethodEventJob.h" #include "XBase.h" #include +#include // // CServerProxy diff --git a/lib/net/CTCPSocket.cpp b/lib/net/CTCPSocket.cpp index c44b41ea..2652aac1 100644 --- a/lib/net/CTCPSocket.cpp +++ b/lib/net/CTCPSocket.cpp @@ -23,7 +23,9 @@ #include "IEventJob.h" #include "CArch.h" #include "XArch.h" -#include +#include +#include +#include // // CTCPSocket diff --git a/lib/platform/CXWindowsScreen.cpp b/lib/platform/CXWindowsScreen.cpp index 9c4ab134..1a813e84 100644 --- a/lib/platform/CXWindowsScreen.cpp +++ b/lib/platform/CXWindowsScreen.cpp @@ -27,6 +27,7 @@ #include "IEventQueue.h" #include "TMethodEventJob.h" #include +#include #if X_DISPLAY_MISSING # error X11 is required to build synergy #else diff --git a/lib/server/CClientProxy1_3.cpp b/lib/server/CClientProxy1_3.cpp index f68b550e..6765d2f8 100644 --- a/lib/server/CClientProxy1_3.cpp +++ b/lib/server/CClientProxy1_3.cpp @@ -17,6 +17,8 @@ #include "CLog.h" #include "IEventQueue.h" #include "TMethodEventJob.h" +#include +#include // // CClientProxy1_3 diff --git a/lib/server/CConfig.cpp b/lib/server/CConfig.cpp index 92054f42..10ee6b8f 100644 --- a/lib/server/CConfig.cpp +++ b/lib/server/CConfig.cpp @@ -19,7 +19,7 @@ #include "XSocket.h" #include "stdistream.h" #include "stdostream.h" -#include +#include // // CConfig diff --git a/lib/server/CInputFilter.cpp b/lib/server/CInputFilter.cpp index d5d7fc20..12c43b05 100644 --- a/lib/server/CInputFilter.cpp +++ b/lib/server/CInputFilter.cpp @@ -19,8 +19,8 @@ #include "CEventQueue.h" #include "CLog.h" #include "TMethodEventJob.h" -#include -#include +#include +#include // ----------------------------------------------------------------------------- // Input Filter Condition Classes diff --git a/lib/server/CServer.cpp b/lib/server/CServer.cpp index 3d4d32c2..9ec942f4 100644 --- a/lib/server/CServer.cpp +++ b/lib/server/CServer.cpp @@ -28,7 +28,8 @@ #include "CLog.h" #include "TMethodEventJob.h" #include "CArch.h" -#include +#include +#include // // CServer diff --git a/lib/synergy/CKeyMap.cpp b/lib/synergy/CKeyMap.cpp index 4141c8b1..7931091a 100644 --- a/lib/synergy/CKeyMap.cpp +++ b/lib/synergy/CKeyMap.cpp @@ -16,8 +16,8 @@ #include "KeyTypes.h" #include "CLog.h" #include -#include -#include +#include +#include CKeyMap::CNameToKeyMap* CKeyMap::s_nameToKeyMap = NULL; CKeyMap::CNameToModifierMap* CKeyMap::s_nameToModifierMap = NULL; diff --git a/lib/synergy/CKeyState.cpp b/lib/synergy/CKeyState.cpp index ff374828..cb5986c7 100644 --- a/lib/synergy/CKeyState.cpp +++ b/lib/synergy/CKeyState.cpp @@ -15,7 +15,7 @@ #include "CKeyState.h" #include "IEventQueue.h" #include "CLog.h" -#include +#include #include static const KeyButton kButtonMask = (KeyButton)(IKeyState::kNumButtons - 1); diff --git a/lib/synergy/CPacketStreamFilter.cpp b/lib/synergy/CPacketStreamFilter.cpp index 4aad9c02..13294021 100644 --- a/lib/synergy/CPacketStreamFilter.cpp +++ b/lib/synergy/CPacketStreamFilter.cpp @@ -16,6 +16,8 @@ #include "IEventQueue.h" #include "CLock.h" #include "TMethodEventJob.h" +#include +#include // // CPacketStreamFilter diff --git a/lib/synergy/IKeyState.cpp b/lib/synergy/IKeyState.cpp index d44e17d3..9e5d8d87 100644 --- a/lib/synergy/IKeyState.cpp +++ b/lib/synergy/IKeyState.cpp @@ -13,7 +13,8 @@ */ #include "IKeyState.h" -#include +#include +#include // // IKeyState diff --git a/lib/synergy/IPrimaryScreen.cpp b/lib/synergy/IPrimaryScreen.cpp index 71b103f3..21d16b69 100644 --- a/lib/synergy/IPrimaryScreen.cpp +++ b/lib/synergy/IPrimaryScreen.cpp @@ -13,6 +13,7 @@ */ #include "IPrimaryScreen.h" +#include // // IPrimaryScreen