fix clang warnings, directly include wtypes.h (#4097)
* build: clang use -Wno-unused-command-line-argument With clang 5.0 builds are quite noisy otherwise. * Directly include wtypes.h Directly include winpr/wtypes.h where _fseeki64 or _ftelli64 is used. * fix build warnings with clang 5 clang version: 5.0.0-svn310678-1~exp1 (branches/release_50) Warning: parentheses-equality * fix build warnings with clang 5 clang version: 5.0.0-svn310678-1~exp1 (branches/release_50) Warning: tautological-compare * fix build warnings with clang 5 clang version: 5.0.0-svn310678-1~exp1 (branches/release_50) Warning: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'UINT32 *' (aka 'unsigned int *') [-Wincompatible-pointer-types]
This commit is contained in:
parent
9a81531cb6
commit
52fbfb7b12
@ -283,6 +283,7 @@ if(${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-macros -Wno-padded")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-c11-extensions -Wno-gnu")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-command-line-argument")
|
||||
if(WITH_SSE2)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mssse3")
|
||||
endif()
|
||||
|
@ -33,7 +33,15 @@
|
||||
#include <winpr/thread.h>
|
||||
#include <winpr/string.h>
|
||||
|
||||
#if __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif /* __clang__ */
|
||||
#include <gst/gst.h>
|
||||
#if __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif /* __clang__ */
|
||||
|
||||
#if GST_VERSION_MAJOR > 0
|
||||
#include <gst/video/videooverlay.h>
|
||||
#else
|
||||
|
@ -33,7 +33,15 @@
|
||||
|
||||
#include <winpr/string.h>
|
||||
|
||||
#if __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif /* __clang__ */
|
||||
#include <gst/gst.h>
|
||||
#if __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif /* __clang__ */
|
||||
|
||||
#include <gst/app/gstappsrc.h>
|
||||
#include <gst/app/gstappsink.h>
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include <freerdp/client/file.h>
|
||||
#include <freerdp/client/cmdline.h>
|
||||
|
||||
@ -41,6 +40,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <freerdp/log.h>
|
||||
#define TAG CLIENT_TAG("common")
|
||||
|
@ -435,8 +435,8 @@
|
||||
#define TEST_MIX \
|
||||
((last_line == 0 && pixel == mix) || \
|
||||
(last_line != 0 && pixel == (ypixel ^ mix)))
|
||||
#define TEST_FOM (TEST_FILL || TEST_MIX)
|
||||
#define TEST_COLOR (pixel == last_pixel)
|
||||
#define TEST_FOM TEST_FILL || TEST_MIX
|
||||
#define TEST_COLOR pixel == last_pixel
|
||||
#define TEST_BICOLOR \
|
||||
( \
|
||||
(pixel != last_pixel) && \
|
||||
@ -559,7 +559,7 @@ int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
mix_count = 0;
|
||||
}
|
||||
|
||||
if (!TEST_COLOR)
|
||||
if (!(TEST_COLOR))
|
||||
{
|
||||
if (color_count > 3 &&
|
||||
color_count >= fill_count &&
|
||||
@ -607,7 +607,7 @@ int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
bicolor_spin = 0;
|
||||
}
|
||||
|
||||
if (!TEST_FOM)
|
||||
if (!(TEST_FOM))
|
||||
{
|
||||
if (fom_count > 3 &&
|
||||
fom_count >= fill_count &&
|
||||
@ -852,7 +852,7 @@ int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
mix_count = 0;
|
||||
}
|
||||
|
||||
if (!TEST_COLOR)
|
||||
if (!(TEST_COLOR))
|
||||
{
|
||||
if (color_count > 3 &&
|
||||
color_count >= fill_count &&
|
||||
@ -900,7 +900,7 @@ int freerdp_bitmap_compress(const char* srcData, int width, int height,
|
||||
bicolor_spin = 0;
|
||||
}
|
||||
|
||||
if (!TEST_FOM)
|
||||
if (!(TEST_FOM))
|
||||
{
|
||||
if (fom_count > 3 &&
|
||||
fom_count >= fill_count &&
|
||||
|
@ -1767,7 +1767,7 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, BYTE* pSrcData, UINT32 SrcSize, BY
|
||||
{
|
||||
UINT32 index;
|
||||
UINT32 bits;
|
||||
UINT32 nbits;
|
||||
INT32 nbits;
|
||||
BYTE* SrcPtr;
|
||||
BYTE* SrcEnd;
|
||||
UINT16 Mask;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/path.h>
|
||||
#include <winpr/image.h>
|
||||
@ -483,7 +484,7 @@ static int test_progressive_load_files(char* ms_sample_path, EGFX_SAMPLE_FILE fi
|
||||
return 1;
|
||||
}
|
||||
|
||||
static BYTE* test_progressive_load_bitmap(char* path, char* file, UINT32* size, int quarter)
|
||||
static BYTE* test_progressive_load_bitmap(char* path, char* file, size_t* size, int quarter)
|
||||
{
|
||||
int status;
|
||||
BYTE* buffer;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/crypto.h>
|
||||
#include <winpr/print.h>
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/crypto.h>
|
||||
|
||||
|
@ -75,19 +75,19 @@ static UINT32 colordist(
|
||||
UINT32 c2)
|
||||
{
|
||||
int d, maxd = 0;
|
||||
d = ABS(ALF(c1) - ALF(c2));
|
||||
d = ABS((INT32)(ALF(c1) - ALF(c2)));
|
||||
|
||||
if (d > maxd) maxd = d;
|
||||
|
||||
d = ABS(RED(c1) - RED(c2));
|
||||
d = ABS((INT32)(RED(c1) - RED(c2)));
|
||||
|
||||
if (d > maxd) maxd = d;
|
||||
|
||||
d = ABS(GRN(c1) - GRN(c2));
|
||||
d = ABS((INT32)(GRN(c1) - GRN(c2)));
|
||||
|
||||
if (d > maxd) maxd = d;
|
||||
|
||||
d = ABS(BLU(c1) - BLU(c2));
|
||||
d = ABS((INT32)(BLU(c1) - BLU(c2)));
|
||||
|
||||
if (d > maxd) maxd = d;
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <freerdp/log.h>
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/path.h>
|
||||
#include <winpr/print.h>
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/file.h>
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include "registry_reg.h"
|
||||
|
@ -71,6 +71,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/system_properties.h>
|
||||
#include <unistd.h>
|
||||
#include <winpr/wtypes.h>
|
||||
|
||||
static pthread_once_t g_once;
|
||||
static int g_inited;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/timezone.h>
|
||||
#include <winpr/crt.h>
|
||||
#include "../log.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <winpr/image.h>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <winpr/ini.h>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/sam.h>
|
||||
#include <winpr/print.h>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/path.h>
|
||||
#include <winpr/print.h>
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "wlog/PacketMessage.h"
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/stream.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user