Fix clang compiler warnings
authorBernhard Miklautz <bernhard.miklautz@thincast.com>
Thu, 15 Jan 2015 23:41:57 +0000 (00:41 +0100)
committerBernhard Miklautz <bernhard.miklautz@thincast.com>
Thu, 15 Jan 2015 23:41:57 +0000 (00:41 +0100)
client/common/cmdline.c
libfreerdp/utils/ringbuffer.c
winpr/libwinpr/utils/test/TestBacktrace.c

index 58cb778..b4fa9cf 100644 (file)
@@ -1081,7 +1081,7 @@ BOOL freerdp_client_detect_command_line(int argc, char** argv, DWORD* flags)
                return compatibility;
 
        /* Check, if this may be windows style syntax... */
-       if (windows_cli_count && (windows_cli_count >= posix_cli_count) || (windows_cli_status <= COMMAND_LINE_STATUS_PRINT))
+       if ((windows_cli_count && (windows_cli_count >= posix_cli_count)) || (windows_cli_status <= COMMAND_LINE_STATUS_PRINT))
        {
                windows_cli_count = 1;
                *flags = COMMAND_LINE_SEPARATOR_COLON;
index 9f92936..cc11ce6 100644 (file)
@@ -201,7 +201,7 @@ BYTE* ringbuffer_ensure_linear_write(RingBuffer* rb, size_t sz)
 
        if (rb->writePtr == rb->readPtr)
        {
-               rb->writePtr = rb->readPtr = NULL;
+               rb->writePtr = rb->readPtr = 0;
        }
 
        if (rb->writePtr + sz < rb->size)
index 2857f31..3104db1 100644 (file)
@@ -20,7 +20,7 @@ int TestBacktrace(int argc, char* argv[])
                        printf("%zd: %s\n", x, msg[x]);
                rc = 0;
        }
-       winpr_backtrace_symbols_fd(stack, stdout);
+       winpr_backtrace_symbols_fd(stack, fileno(stdout));
        
        winpr_backtrace_free(stack);