From c70293aa60378c9bca5492ac71561038a4cfaa28 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Fri, 16 Jan 2015 00:41:57 +0100 Subject: [PATCH] Fix clang compiler warnings --- client/common/cmdline.c | 2 +- libfreerdp/utils/ringbuffer.c | 2 +- winpr/libwinpr/utils/test/TestBacktrace.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 58cb7782f..b4fa9cfce 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -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; diff --git a/libfreerdp/utils/ringbuffer.c b/libfreerdp/utils/ringbuffer.c index 9f929369f..cc11ce6aa 100644 --- a/libfreerdp/utils/ringbuffer.c +++ b/libfreerdp/utils/ringbuffer.c @@ -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) diff --git a/winpr/libwinpr/utils/test/TestBacktrace.c b/winpr/libwinpr/utils/test/TestBacktrace.c index 2857f315b..3104db1a3 100644 --- a/winpr/libwinpr/utils/test/TestBacktrace.c +++ b/winpr/libwinpr/utils/test/TestBacktrace.c @@ -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);