summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/maintainer.cmake5
-rw-r--r--extra/mariabackup/xtrabackup.cc5
-rw-r--r--extra/my_print_defaults.c3
-rw-r--r--sql/log_event.cc4
-rw-r--r--sql/sql_acl.cc4
-rw-r--r--storage/connect/CMakeLists.txt39
-rw-r--r--storage/connect/fmdlex.c16
-rw-r--r--storage/connect/jsonudf.cpp2
-rw-r--r--storage/connect/plugutil.cpp2
-rw-r--r--storage/connect/rcmsg.c7
-rw-r--r--storage/connect/rcmsg.h2
-rw-r--r--storage/connect/tabmul.cpp4
-rw-r--r--storage/connect/value.cpp2
-rw-r--r--storage/mroonga/CMakeLists.txt1
-rw-r--r--storage/mroonga/vendor/groonga/CMakeLists.txt3
-rw-r--r--storage/mroonga/vendor/groonga/lib/dat/cursor-factory.cpp1
-rw-r--r--storage/mroonga/vendor/groonga/lib/tokenizers.c2
-rw-r--r--storage/tokudb/PerconaFT/third_party/snappy-1.1.2/CMakeLists.txt1
-rwxr-xr-xstorage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure92
-rw-r--r--storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure.ac57
-rw-r--r--storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/m4/libtool.m46
21 files changed, 48 insertions, 210 deletions
diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake
index 367b78afd0d..0541cca86a5 100644
--- a/cmake/maintainer.cmake
+++ b/cmake/maintainer.cmake
@@ -20,6 +20,11 @@ IF(HAVE_C__Wvla)
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla")
ENDIF()
+MY_CHECK_C_COMPILER_FLAG("-Wno-format-truncation")
+IF(HAVE_C__Wno_format_truncation)
+ SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wno-format-truncation")
+ENDIF()
+
# Common warning flags for GCC and Clang
SET(MY_C_WARNING_FLAGS
"${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement")
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 14d7c5821c7..2c67f48af4a 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -5054,7 +5054,7 @@ xb_process_datadir(
callback */
{
ulint ret;
- char dbpath[FN_REFLEN];
+ char dbpath[OS_FILE_MAX_PATH];
os_file_dir_t dir;
os_file_dir_t dbdir;
os_file_stat_t dbinfo;
@@ -5120,8 +5120,7 @@ next_file_item_1:
goto next_datadir_item;
}
- sprintf(dbpath, "%s/%s", path,
- dbinfo.name);
+ snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name);
srv_normalize_path_for_win(dbpath);
dbdir = os_file_opendir(dbpath, FALSE);
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index cb883a60f85..78940e02ca4 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -98,7 +98,8 @@ static struct my_option my_long_options[] =
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-void cleanup_and_exit(int exit_code)
+static void cleanup_and_exit(int exit_code) __attribute__ ((noreturn));
+static void cleanup_and_exit(int exit_code)
{
my_end(0);
exit(exit_code);
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 2879b767af2..f2f7b877671 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2469,8 +2469,8 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr,
case 2:
{
strmake(typestr, "ENUM(2 bytes)", typestr_length);
- if (!ptr)
- goto return_null;
+ if (!ptr)
+ goto return_null;
int32 i32= uint2korr(ptr);
my_b_printf(file, "%d", i32);
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 0c7e3856e00..5ccc5f75118 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -634,9 +634,6 @@ bool ROLE_GRANT_PAIR::init(MEM_ROOT *mem, char *username,
char *hostname, char *rolename,
bool with_admin_option)
{
- if (!this)
- return true;
-
size_t uname_l = safe_strlen(username);
size_t hname_l = safe_strlen(hostname);
size_t rname_l = safe_strlen(rolename);
@@ -10516,7 +10513,6 @@ bool check_role_is_granted(const char *username,
DBUG_RETURN(result);
}
-
int fill_schema_enabled_roles(THD *thd, TABLE_LIST *tables, COND *cond)
{
TABLE *table= tables->table;
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 1f687c3c8d8..22860ca34d4 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -45,34 +45,17 @@ add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT -DUSE_TRY )
# OS specific C flags, definitions and source files.
#
IF(UNIX)
- if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
- # Bar: -Wfatal-errors removed (does not present in gcc on solaris10)
- if(WITH_WARNINGS)
- add_definitions(-Wall -Wextra -Wmissing-declarations)
- #message(STATUS "CONNECT: GCC: All warnings enabled")
- else()
- add_definitions(-Wall -Wmissing-declarations)
- add_definitions(-Wno-write-strings)
- add_definitions(-Wno-unused-variable)
- # Bar: -Wno-unused-but-set-variables commented (does not present on sol10)
- # add_definitions(-Wno-unused-but-set-variable)
- add_definitions(-Wno-unused-value)
- add_definitions(-Wno-unused-function)
- add_definitions(-Wno-parentheses)
- #add_definitions(-Wno-missing-declarations)
- # Bar: -Wno-int-to-pointer-cast commended (does not present in gcc on sol10)
- # add_definitions(-Wno-int-to-pointer-cast)
- # Bar: -Wno-narrowing commented (does not present in gcc on solaris10)
- # add_definitions(-Wno-narrowing)
-
-# This switch is for pure C only:
-# add_definitions(-Wno-implicit-function-declaration)
-# These switches are for C++ only
-# add_definitions(-Wno-reorder)
-
- #message(STATUS "CONNECT: GCC: Some warnings disabled")
- endif(WITH_WARNINGS)
- endif()
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wall -Wmissing-declarations")
+ if(NOT WITH_WARNINGS)
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-function")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-variable")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-value")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-parentheses")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-misleading-indentation")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-format-truncation")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough")
+ endif(NOT WITH_WARNINGS)
add_definitions( -DUNIX -DLINUX -DUBUNTU )
diff --git a/storage/connect/fmdlex.c b/storage/connect/fmdlex.c
index 548a7ae5b7e..64429d9b93e 100644
--- a/storage/connect/fmdlex.c
+++ b/storage/connect/fmdlex.c
@@ -417,10 +417,10 @@ static PDTP pp;
static void MakeParm(int n);
static void MakeMMDD(int n);
static void MakeAMPM(int n);
-static void MakeIn(char *);
-static void MakeOut(char *);
-static void Quotin(char *);
-static void Quotout(char *);
+static void MakeIn(const char *);
+static void MakeOut(const char *);
+static void Quotin(const char *);
+static void Quotout(const char *);
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1492,7 +1492,7 @@ void MakeAMPM(int n)
} /* end of MakeAMPM */
-void MakeIn(char *text)
+void MakeIn(const char *text)
{
if (!pp->InFmt)
return;
@@ -1500,14 +1500,14 @@ void MakeIn(char *text)
strncat(pp->InFmt, text, (pp->Outsize - 1) - strlen(pp->InFmt));
} /* end of MakeIn */
-void MakeOut(char *text)
+void MakeOut(const char *text)
{
if (!pp->OutFmt) return;
strncat(pp->OutFmt, text, (pp->Outsize - 1) - strlen(pp->OutFmt));
} /* end of MakeOut */
-void Quotin(char *text)
+void Quotin(const char *text)
{
if (!pp->InFmt)
return;
@@ -1516,7 +1516,7 @@ void Quotin(char *text)
pp->InFmt[strlen(pp->InFmt)-1] = '\0';
} /* end of Quotin */
-void Quotout(char *text)
+void Quotout(const char *text)
{
if (!pp->OutFmt)
return;
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 4f0978cb548..7a7ec005e24 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -1510,7 +1510,7 @@ static my_bool CheckMemory(PGLOBAL g, UDF_INIT *initid, UDF_ARGS *args, uint n,
if (!(g->Sarea = PlugAllocMem(g, ml))) {
char errmsg[MAX_STR];
- sprintf(errmsg, MSG(WORK_AREA), g->Message);
+ snprintf(errmsg, sizeof(errmsg)-1, MSG(WORK_AREA), g->Message);
strcpy(g->Message, errmsg);
g->Sarea_Size = 0;
return true;
diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp
index d63674e2e36..0855e265704 100644
--- a/storage/connect/plugutil.cpp
+++ b/storage/connect/plugutil.cpp
@@ -162,7 +162,7 @@ PGLOBAL PlugInit(LPCSTR Language, uint worksize)
/*******************************************************************/
if (worksize && !(g->Sarea = PlugAllocMem(g, worksize))) {
char errmsg[MAX_STR];
- sprintf(errmsg, MSG(WORK_AREA), g->Message);
+ snprintf(errmsg, sizeof(errmsg) - 1, MSG(WORK_AREA), g->Message);
strcpy(g->Message, errmsg);
g->Sarea_Size = 0;
} else
diff --git a/storage/connect/rcmsg.c b/storage/connect/rcmsg.c
index 75759e03314..895f8f5862b 100644
--- a/storage/connect/rcmsg.c
+++ b/storage/connect/rcmsg.c
@@ -27,9 +27,9 @@
char *msglang(void);
-char *GetMsgid(int id)
+const char *GetMsgid(int id)
{
- char *p = NULL;
+ const char *p = NULL;
// This conditional until a real fix is found for MDEV-7304
#if defined(FRENCH)
@@ -55,7 +55,8 @@ char *GetMsgid(int id)
int GetRcString(int id, char *buf, int bufsize)
{
- char *p = NULL, msg[32];
+ const char *p = NULL;
+ char msg[32];
if (!(p = GetMsgid(id))) {
sprintf(msg, "ID=%d unknown", id);
diff --git a/storage/connect/rcmsg.h b/storage/connect/rcmsg.h
index b22e77f5175..499ca3b2dd4 100644
--- a/storage/connect/rcmsg.h
+++ b/storage/connect/rcmsg.h
@@ -5,7 +5,7 @@
extern "C" {
#endif
-char *GetMsgid(int id);
+const char *GetMsgid(int id);
int GetRcString(int id, char *buf, int bufsize);
#ifdef __cplusplus
diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp
index 5c41f9094ac..0967afca6cd 100644
--- a/storage/connect/tabmul.cpp
+++ b/storage/connect/tabmul.cpp
@@ -203,12 +203,12 @@ bool TDBMUL::InitFileNames(PGLOBAL g)
// Data files can be imported from Windows (having CRLF)
if (*p == '\n' || *p == '\r') {
// is this enough for Unix ???
- *p--; // Eliminate ending CR or LF character
+ p--; // Eliminate ending CR or LF character
if (p >= filename)
// is this enough for Unix ???
if (*p == '\n' || *p == '\r')
- *p--; // Eliminate ending CR or LF character
+ p--; // Eliminate ending CR or LF character
} // endif p
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp
index f08d18b5421..83f008fbee1 100644
--- a/storage/connect/value.cpp
+++ b/storage/connect/value.cpp
@@ -1374,7 +1374,7 @@ bool TYPVAL<PSZ>::SetValue_char(const char *cp, int n)
} else if (cp != Strp) {
const char *p = cp + n - 1;
- for (p; p >= cp; p--, n--)
+ for (; p >= cp; p--, n--)
if (*p && *p != ' ')
break;
diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt
index 39dad9ce16b..a9f9d7cc8b2 100644
--- a/storage/mroonga/CMakeLists.txt
+++ b/storage/mroonga/CMakeLists.txt
@@ -343,6 +343,7 @@ else()
MY_CHECK_AND_SET_COMPILER_FLAG("-fno-exceptions")
MY_CHECK_AND_SET_COMPILER_FLAG("-fno-rtti")
MY_CHECK_AND_SET_COMPILER_FLAG("-felide-constructors")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough")
endif()
set_source_files_properties(${MRN_SOURCES} PROPERTIES
COMPILE_FLAGS "${MYSQL_CFLAGS} ${MRN_CXX_COMPILE_FLAGS}")
diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt
index 2d8a59fa664..6c448a4e606 100644
--- a/storage/mroonga/vendor/groonga/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -154,7 +154,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX)
MY_CHECK_AND_SET_COMPILER_FLAG("-Wformat=2")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wstrict-aliasing=2")
MY_CHECK_AND_SET_COMPILER_FLAG("-fno-strict-aliasing")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wdisabled-optimization")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-disabled-optimization")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wfloat-equal")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wpointer-arith")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wdeclaration-after-statement")
@@ -165,6 +165,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX)
MY_CHECK_AND_SET_COMPILER_FLAG("-fexceptions")
MY_CHECK_AND_SET_COMPILER_FLAG("-fimplicit-templates")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-clobbered")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough")
endif()
if(NOT DEFINED CMAKE_C_COMPILE_OPTIONS_PIC)
diff --git a/storage/mroonga/vendor/groonga/lib/dat/cursor-factory.cpp b/storage/mroonga/vendor/groonga/lib/dat/cursor-factory.cpp
index 6dab51a2978..7276c148796 100644
--- a/storage/mroonga/vendor/groonga/lib/dat/cursor-factory.cpp
+++ b/storage/mroonga/vendor/groonga/lib/dat/cursor-factory.cpp
@@ -32,7 +32,6 @@ Cursor *CursorFactory::open(const Trie &trie,
UInt32 offset,
UInt32 limit,
UInt32 flags) {
- GRN_DAT_THROW_IF(PARAM_ERROR, &trie == NULL);
const UInt32 cursor_type = flags & CURSOR_TYPE_MASK;
switch (cursor_type) {
diff --git a/storage/mroonga/vendor/groonga/lib/tokenizers.c b/storage/mroonga/vendor/groonga/lib/tokenizers.c
index 28fd13c33c4..c5f112fa8cd 100644
--- a/storage/mroonga/vendor/groonga/lib/tokenizers.c
+++ b/storage/mroonga/vendor/groonga/lib/tokenizers.c
@@ -544,7 +544,7 @@ regexp_next(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
grn_obj *buffer = &(tokenizer->buffer);
const char *current = tokenizer->next;
const char *end = tokenizer->end;
- const const uint_least8_t *char_types = tokenizer->char_types;
+ const uint_least8_t *char_types = tokenizer->char_types;
grn_tokenize_mode mode = tokenizer->query->tokenize_mode;
grn_bool is_begin = tokenizer->is_begin;
grn_bool is_start_token = tokenizer->is_start_token;
diff --git a/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/CMakeLists.txt b/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/CMakeLists.txt
index f9d93917627..c241f7918ee 100644
--- a/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/CMakeLists.txt
+++ b/storage/tokudb/PerconaFT/third_party/snappy-1.1.2/CMakeLists.txt
@@ -1,3 +1,4 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(snappy_srcs
diff --git a/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure b/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure
index 9dc3178ba75..f0a417e0d29 100755
--- a/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure
+++ b/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure
@@ -19870,98 +19870,6 @@ if test -n "$CFLAG_VISIBILITY" && test "$is_w32" = no; then
AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
fi
-if test "$GCC" = yes ; then
- # Enable as much warnings as possible. These commented warnings won't
- # work for this package though:
- # * -Wunreachable-code breaks several assert(0) cases, which are
- # backed up with "return LZMA_PROG_ERROR".
- # * -Wcast-qual would break various things where we need a non-const
- # pointer although we don't modify anything through it.
- # * -Wcast-align breaks optimized CRC32 and CRC64 implementation
- # on some architectures (not on x86), where this warning is bogus,
- # because we take care of correct alignment.
- # * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations
- # don't seem so useful here; at least the last one gives some
- # warnings which are not bugs.
- for NEW_FLAG in \
- -Wall \
- -Wextra \
- -Wformat=2 \
- -Winit-self \
- -Wmissing-include-dirs \
- -Wstrict-aliasing \
- -Wfloat-equal \
- -Wundef \
- -Wshadow \
- -Wpointer-arith \
- -Wbad-function-cast \
- -Wwrite-strings \
- -Wlogical-op \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wold-style-definition \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wmissing-noreturn \
- -Wredundant-decls
- do
- { $as_echo "$as_me:$LINENO: checking if $CC accepts $NEW_FLAG" >&5
-$as_echo_n "checking if $CC accepts $NEW_FLAG... " >&6; }
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $NEW_FLAG"
- cat >conftest.$ac_ext <<_ACEOF
-void foo(void) { }
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
- AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$OLD_CFLAGS"
- done
-
- # Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then
- enableval=$enable_werror;
-else
- enable_werror=no
-fi
-
- if test "x$enable_werror" = "xyes"; then
- AM_CFLAGS="$AM_CFLAGS -Werror"
- fi
-fi
-
-
###############################################################################
# Create the makefiles and config.h
###############################################################################
diff --git a/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure.ac b/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure.ac
index d125a6936da..fbc59b230c9 100644
--- a/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure.ac
+++ b/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/configure.ac
@@ -569,63 +569,6 @@ if test -n "$CFLAG_VISIBILITY" && test "$is_w32" = no; then
AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
fi
-if test "$GCC" = yes ; then
- # Enable as much warnings as possible. These commented warnings won't
- # work for this package though:
- # * -Wunreachable-code breaks several assert(0) cases, which are
- # backed up with "return LZMA_PROG_ERROR".
- # * -Wcast-qual would break various things where we need a non-const
- # pointer although we don't modify anything through it.
- # * -Wcast-align breaks optimized CRC32 and CRC64 implementation
- # on some architectures (not on x86), where this warning is bogus,
- # because we take care of correct alignment.
- # * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations
- # don't seem so useful here; at least the last one gives some
- # warnings which are not bugs.
- for NEW_FLAG in \
- -Wall \
- -Wextra \
- -Wformat=2 \
- -Winit-self \
- -Wmissing-include-dirs \
- -Wstrict-aliasing \
- -Wfloat-equal \
- -Wundef \
- -Wshadow \
- -Wpointer-arith \
- -Wbad-function-cast \
- -Wwrite-strings \
- -Wlogical-op \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wold-style-definition \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wmissing-noreturn \
- -Wredundant-decls
- do
- AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $NEW_FLAG"
- AC_COMPILE_IFELSE([void foo(void) { }], [
- AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
- AC_MSG_RESULT([yes])
- ], [
- AC_MSG_RESULT([no])
- ])
- CFLAGS="$OLD_CFLAGS"
- done
-
- AC_ARG_ENABLE([werror],
- AC_HELP_STRING([--enable-werror], [Enable -Werror to abort
- compilation on all compiler warnings.]),
- [], [enable_werror=no])
- if test "x$enable_werror" = "xyes"; then
- AM_CFLAGS="$AM_CFLAGS -Werror"
- fi
-fi
-
-
###############################################################################
# Create the makefiles and config.h
###############################################################################
diff --git a/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/m4/libtool.m4 b/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/m4/libtool.m4
index 39ba996cb96..faec0c309e8 100644
--- a/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/m4/libtool.m4
+++ b/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/m4/libtool.m4
@@ -1021,7 +1021,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
# to the aix ld manual.
m4_defun([_LT_SYS_MODULE_PATH_AIX],
[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+AC_LINK_IFELSE([AC_LANG_PROGRAM],[
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
/^0/ {
@@ -4826,9 +4826,9 @@ _LT_EOF
# implicitly export all symbols.
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(int foo(void) {},
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int foo(void) {}]),
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- )
+ ])
LDFLAGS="$save_LDFLAGS"
else
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'