Merge pull request #3660 from firewave/wextra
configure.ac: enabled `-Wextra` compiler warning
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ list_create_sized(unsigned int size)
|
||||
{
|
||||
size = DEFAULT_LIST_SIZE;
|
||||
}
|
||||
self = (struct list *)calloc(sizeof(struct list), 1);
|
||||
self = (struct list *)calloc(1, sizeof(struct list));
|
||||
if (self != NULL)
|
||||
{
|
||||
self->items = (tbus *)malloc(sizeof(tbus) * size);
|
||||
|
||||
@@ -228,6 +228,13 @@ AX_TYPE_SOCKLEN_T
|
||||
AX_CFLAGS_WARN_ALL
|
||||
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes], ,[-Werror])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wextra])
|
||||
# xrdp uses many zero initializers (C99 6.7.8.21). These
|
||||
# require the warning regarding missing field initializers to
|
||||
# be disabled.
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-missing-field-initializers])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-unused-parameter])
|
||||
AX_APPEND_COMPILE_FLAGS([-Wno-sign-compare])
|
||||
|
||||
AM_COND_IF([LINUX],
|
||||
[AX_APPEND_COMPILE_FLAGS([-Werror])]) # bsd has warnings that have not been fixed yet
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
#include "string_calls.h"
|
||||
#include "fv1.h"
|
||||
|
||||
const static char FV1_SIGNATURE[] = {'F', 'N', 'T', '1'};
|
||||
static const char FV1_SIGNATURE[] = {'F', 'N', 'T', '1'};
|
||||
|
||||
/*****************************************************************************/
|
||||
struct fv1_glyph *
|
||||
|
||||
@@ -42,12 +42,15 @@
|
||||
#include <fdk-aac/aacenc_lib.h>
|
||||
static HANDLE_AACENCODER g_fdk_aac_encoder = 0;
|
||||
|
||||
#if defined(AACENCODER_LIB_VL0)
|
||||
#define AACENCODER_LIB_VER_GTEQ(vl0, vl1, vl2) \
|
||||
(defined(AACENCODER_LIB_VL0) && \
|
||||
((AACENCODER_LIB_VL0 > vl0) || \
|
||||
(AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1) || \
|
||||
(AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 == vl1 && AACENCODER_LIB_VL2 > vl2)))
|
||||
#endif
|
||||
((AACENCODER_LIB_VL0 > vl0) || \
|
||||
(AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 > vl1) || \
|
||||
(AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 == vl1 && AACENCODER_LIB_VL2 >= vl2))
|
||||
#else
|
||||
#define AACENCODER_LIB_VER_GTEQ(vl0, vl1, vl2) 0
|
||||
#endif // AACENCODER_LIB_VL0
|
||||
#endif // XRDP_FDK_AAC
|
||||
|
||||
#if defined(XRDP_OPUS)
|
||||
#include <opus/opus.h>
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
|
||||
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
const static char
|
||||
static const char
|
||||
utf8_simple_test_with_emoji[] =
|
||||
"Simple Test."
|
||||
"\xf0\x9f\x98\xa5"; // U+1F625 Disappointed But Relieved Face
|
||||
|
||||
const static char16_t
|
||||
static const char16_t
|
||||
utf16_simple_test_with_emoji[] =
|
||||
{
|
||||
'S', 'i', 'm', 'p', 'l', 'e', ' ', 'T', 'e', 's', 't', '.',
|
||||
|
||||
@@ -34,7 +34,7 @@ struct utf8_encode_sub_test
|
||||
};
|
||||
|
||||
// Used as the simple test in UTF-8-test.txt
|
||||
const static char greek_kosme[] =
|
||||
static const char greek_kosme[] =
|
||||
"\xce\xba" // GREEK SMALL LETTER KAPPA
|
||||
"\xe1\xbd\xb9" // GREEK SMALL LETTER OMICRON WITH OXIA
|
||||
"\xcf\x83" // GREEK SMALL LETTER SIGMA
|
||||
@@ -42,7 +42,7 @@ const static char greek_kosme[] =
|
||||
"\xce\xb5"; // GREEK SMALL LETTER EPSILON
|
||||
|
||||
// See Issue #2603
|
||||
const static char simple_test_with_emoji[] =
|
||||
static const char simple_test_with_emoji[] =
|
||||
"Simple Test."
|
||||
"\xf0\x9f\x98\xa5"; // U+1F625 Disappointed But Relieved Face
|
||||
|
||||
|
||||
Reference in New Issue
Block a user