commit 56e4ccd6a2990a7833e119e3f22cefbeaaabc2e0
Author: Georg Baum <[email protected]>
Date:   Sun May 8 10:51:51 2016 +0200

    Fix compiler warnings
    
    Only the ones I understand (DWORD is always unsigned). There are more:
    
    ../../src/Server.cpp: In member function ‘bool lyx::LyXComm::pipeServer()’:
    ../../src/Server.cpp:280:10: warning: enumeration value ‘CONNECTING_STATE’ 
not handled in switch [-Wswitch]
       switch (pipe_[i].state) {
                 ^
         ../../src/Server.cpp:347:8: warning: ‘success’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
                 && status == pipe_[i].iobuf.length()) {
                 ^

diff --git a/src/Server.cpp b/src/Server.cpp
index b7fa35e..1a66682 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -136,7 +136,7 @@ DWORD WINAPI pipeServerWrapper(void * arg)
 
 
 LyXComm::LyXComm(string const & pip, Server * cli, ClientCallbackfct ccb)
-       : pipename_(pip), client_(cli), clientcb_(ccb), stopserver_(0)
+       : stopserver_(0), pipename_(pip), client_(cli), clientcb_(ccb)
 {
        for (int i = 0; i < MAX_PIPES; ++i) {
                event_[i] = 0;
@@ -209,7 +209,7 @@ bool LyXComm::pipeServer()
 
                // Determine which pipe instance completed the operation.
                i = wait - WAIT_OBJECT_0;
-               LASSERT(i >= 0 && i <= MAX_PIPES, /**/);
+               LASSERT(i <= MAX_PIPES, /**/);
 
                // Check whether we were waked up for stopping the pipe server.
                if (i == MAX_PIPES)

Reply via email to