Commit 617ae440 authored by Sergei Golubchik's avatar Sergei Golubchik

merged

parents 65d66ae1 966661c8
...@@ -568,44 +568,34 @@ int __void__; ...@@ -568,44 +568,34 @@ int __void__;
#endif /* DONT_DEFINE_VOID */ #endif /* DONT_DEFINE_VOID */
/* /*
Try to suppress warning for not initialized variables. Deprecated workaround for false-positive uninitialized variables
warnings. Those should be silenced using tool-specific heuristics.
With gcc when using C, we suppress the uninitialized variable warning Enabled by default for g++ due to the bug referenced below.
without generating code. We can't do this with C++
for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772).
*/ */
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
#if defined(FORCE_INIT_OF_VARS) (defined(__GNUC__) && defined(__cplusplus))
#define LINT_INIT(var) var= 0 #define LINT_INIT(var) var= 0
#if defined(__cplusplus) || !defined(__GNUC__)
#define UNINIT_VAR(x) x= 0
#else #else
/* GCC specific self-initialization which inhibits the warning. */
#define UNINIT_VAR(x) x= x
#endif
#else /* !FORCE_INIT_OF_VARS */
#define LINT_INIT(var) #define LINT_INIT(var)
#if !defined(__cplusplus) && !defined(__GNUC__)
/* GCC specific self-initialization which inhibits the warning. */
#define UNINIT_VAR(x) x= x
#else
#define UNINIT_VAR(x) x
#endif #endif
#endif /* FORCE_INIT_OF_VARS */
#include <my_valgrind.h>
/* /*
The following is to force some unitialized variables to 0 if we are Suppress uninitialized variable warning without generating code.
running valgrind. This is needed when the compiler may access the variable
even if the value of it is never used. The _cplusplus is a temporary workaround for C++ code pending a fix
for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772).
*/ */
#if defined(HAVE_valgrind) #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
#define VALGRIND_OR_LINT_INIT(var) var=0 defined(__cplusplus) || !defined(__GNUC__)
#define UNINIT_VAR(x) x= 0
#else #else
#define VALGRIND_OR_LINT_INIT(var) LINT_INIT(var) /* GCC specific self-initialization which inhibits the warning. */
#define UNINIT_VAR(x) x= x
#endif #endif
#include <my_valgrind.h>
/* Define some useful general macros */ /* Define some useful general macros */
#if !defined(max) #if !defined(max)
#define max(a, b) ((a) > (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
...@@ -621,7 +611,7 @@ typedef unsigned short ushort; ...@@ -621,7 +611,7 @@ typedef unsigned short ushort;
#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1) #define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0) #define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
#define swap_variables(t, a, b) { t swap_dummy; swap_dummy= a; a= b; b= swap_dummy; } #define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; }
#define test(a) ((a) ? 1 : 0) #define test(a) ((a) ? 1 : 0)
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
......
...@@ -27,15 +27,12 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ ...@@ -27,15 +27,12 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
EXTRA_LTLIBRARIES = libdaemon_example.la EXTRA_LTLIBRARIES = libdaemon_example.la
pkgplugin_LTLIBRARIES = @plugin_daemon_example_shared_target@ pkgplugin_LTLIBRARIES = @plugin_daemon_example_shared_target@
libdaemon_example_la_LDFLAGS = -module -rpath $(pkgplugindir) libdaemon_example_la_LDFLAGS = -module -rpath $(pkgplugindir)
libdaemon_example_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN libdaemon_example_la_CXXFLAGS= -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
libdaemon_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
libdaemon_example_la_SOURCES = daemon_example.cc libdaemon_example_la_SOURCES = daemon_example.cc
EXTRA_LIBRARIES = libdaemon_example.a EXTRA_LIBRARIES = libdaemon_example.a
noinst_LIBRARIES = @plugin_daemon_example_static_target@ noinst_LIBRARIES = @plugin_daemon_example_static_target@
libdaemon_example_a_CXXFLAGS = $(AM_CXXFLAGS) libdaemon_example_a_CXXFLAGS = $(AM_CXXFLAGS)
libdaemon_example_a_CFLAGS = $(AM_CFLAGS)
libdaemon_example_a_SOURCES= daemon_example.cc libdaemon_example_a_SOURCES= daemon_example.cc
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
......
...@@ -21,7 +21,7 @@ INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include ...@@ -21,7 +21,7 @@ INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include
pkgplugin_LTLIBRARIES= mypluglib.la pkgplugin_LTLIBRARIES= mypluglib.la
mypluglib_la_SOURCES= plugin_example.c mypluglib_la_SOURCES= plugin_example.c
mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir) mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir)
mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN mypluglib_la_CFLAGS= -shared -DMYSQL_DYNAMIC_PLUGIN
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
...@@ -288,11 +288,6 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, ...@@ -288,11 +288,6 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
CHARSET_INFO *cs= &my_charset_bin; CHARSET_INFO *cs= &my_charset_bin;
DBUG_ENTER("extract_date_time"); DBUG_ENTER("extract_date_time");
LINT_INIT(strict_week_number);
/* Remove valgrind varnings when using gcc 3.3 and -O1 */
VALGRIND_OR_LINT_INIT(strict_week_number_year_type);
VALGRIND_OR_LINT_INIT(sunday_first_n_first_week_non_iso);
if (!sub_pattern_end) if (!sub_pattern_end)
bzero((char*) l_time, sizeof(*l_time)); bzero((char*) l_time, sizeof(*l_time));
......
...@@ -36,8 +36,8 @@ noinst_PROGRAMS = archive_test archive_reader ...@@ -36,8 +36,8 @@ noinst_PROGRAMS = archive_test archive_reader
EXTRA_LTLIBRARIES = ha_archive.la EXTRA_LTLIBRARIES = ha_archive.la
pkgplugin_LTLIBRARIES = @plugin_archive_shared_target@ pkgplugin_LTLIBRARIES = @plugin_archive_shared_target@
ha_archive_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_archive_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_archive_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_CXXFLAGS= -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_archive_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_CFLAGS = -shared $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_archive_la_SOURCES = ha_archive.cc azio.c ha_archive_la_SOURCES = ha_archive.cc azio.c
......
...@@ -35,15 +35,13 @@ noinst_HEADERS = ha_blackhole.h ...@@ -35,15 +35,13 @@ noinst_HEADERS = ha_blackhole.h
EXTRA_LTLIBRARIES = ha_blackhole.la EXTRA_LTLIBRARIES = ha_blackhole.la
pkgplugin_LTLIBRARIES = @plugin_blackhole_shared_target@ pkgplugin_LTLIBRARIES = @plugin_blackhole_shared_target@
ha_blackhole_la_LDFLAGS=-module -rpath $(pkgplugindir) ha_blackhole_la_LDFLAGS=-module -rpath $(pkgplugindir)
ha_blackhole_la_CXXFLAGS=$(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_blackhole_la_CXXFLAGS=-shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_blackhole_la_CFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_blackhole_la_SOURCES=ha_blackhole.cc ha_blackhole_la_SOURCES=ha_blackhole.cc
EXTRA_LIBRARIES = libblackhole.a EXTRA_LIBRARIES = libblackhole.a
noinst_LIBRARIES = @plugin_blackhole_static_target@ noinst_LIBRARIES = @plugin_blackhole_static_target@
libblackhole_a_CXXFLAGS=$(AM_CXXFLAGS) libblackhole_a_CXXFLAGS=$(AM_CXXFLAGS)
libblackhole_a_CFLAGS = $(AM_CFLAGS)
libblackhole_a_SOURCES= ha_blackhole.cc libblackhole_a_SOURCES= ha_blackhole.cc
......
...@@ -32,7 +32,7 @@ noinst_HEADERS = ha_tina.h transparent_file.h ...@@ -32,7 +32,7 @@ noinst_HEADERS = ha_tina.h transparent_file.h
EXTRA_LTLIBRARIES = ha_csv.la EXTRA_LTLIBRARIES = ha_csv.la
pkglib_LTLIBRARIES = @plugin_csv_shared_target@ pkglib_LTLIBRARIES = @plugin_csv_shared_target@
ha_csv_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) ha_csv_la_LDFLAGS = -module -rpath $(MYSQLLIBdir)
ha_csv_la_CXXFLAGS = $(AM_CXXFLAGS) -DMYSQL_PLUGIN ha_csv_la_CXXFLAGS = -shared $(AM_CXXFLAGS) -DMYSQL_PLUGIN
ha_csv_la_SOURCES = transparent_file.cc ha_tina.cc ha_csv_la_SOURCES = transparent_file.cc ha_tina.cc
EXTRA_LIBRARIES = libcsv.a EXTRA_LIBRARIES = libcsv.a
......
...@@ -35,15 +35,12 @@ noinst_HEADERS = ha_example.h ...@@ -35,15 +35,12 @@ noinst_HEADERS = ha_example.h
EXTRA_LTLIBRARIES = ha_example.la EXTRA_LTLIBRARIES = ha_example.la
pkgplugin_LTLIBRARIES = @plugin_example_shared_target@ pkgplugin_LTLIBRARIES = @plugin_example_shared_target@
ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_example_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_example_la_CXXFLAGS= -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_example_la_SOURCES = ha_example.cc ha_example_la_SOURCES = ha_example.cc
EXTRA_LIBRARIES = libexample.a EXTRA_LIBRARIES = libexample.a
noinst_LIBRARIES = @plugin_example_static_target@ noinst_LIBRARIES = @plugin_example_static_target@
libexample_a_CXXFLAGS = $(AM_CXXFLAGS) libexample_a_CXXFLAGS = $(AM_CXXFLAGS)
libexample_a_CFLAGS = $(AM_CFLAGS)
libexample_a_SOURCES= ha_example.cc libexample_a_SOURCES= ha_example.cc
......
...@@ -33,15 +33,14 @@ noinst_HEADERS = ha_federated.h ...@@ -33,15 +33,14 @@ noinst_HEADERS = ha_federated.h
EXTRA_LTLIBRARIES = ha_federated.la EXTRA_LTLIBRARIES = ha_federated.la
pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@ pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_federated_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_CXXFLAGS= -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_CFLAGS = -shared $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federated_la_SOURCES = ha_federated.cc $(top_srcdir)/mysys/string.c ha_federated_la_SOURCES = ha_federated.cc $(top_srcdir)/mysys/string.c
EXTRA_LIBRARIES = libfederated.a EXTRA_LIBRARIES = libfederated.a
noinst_LIBRARIES = @plugin_federated_static_target@ noinst_LIBRARIES = @plugin_federated_static_target@
libfederated_a_CXXFLAGS = $(AM_CXXFLAGS) libfederated_a_CXXFLAGS = $(AM_CXXFLAGS)
libfederated_a_CFLAGS = $(AM_CFLAGS)
libfederated_a_SOURCES= ha_federated.cc libfederated_a_SOURCES= ha_federated.cc
......
...@@ -20,14 +20,13 @@ noinst_HEADERS = ha_federatedx.h federatedx_probes.h ...@@ -20,14 +20,13 @@ noinst_HEADERS = ha_federatedx.h federatedx_probes.h
EXTRA_LTLIBRARIES = ha_federatedx.la EXTRA_LTLIBRARIES = ha_federatedx.la
pkgplugin_LTLIBRARIES = @plugin_federatedx_shared_target@ pkgplugin_LTLIBRARIES = @plugin_federatedx_shared_target@
ha_federatedx_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_federatedx_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_federatedx_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federatedx_la_CXXFLAGS= -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federatedx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federatedx_la_CFLAGS = -shared $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
EXTRA_LIBRARIES = libfederatedx.a EXTRA_LIBRARIES = libfederatedx.a
noinst_LIBRARIES = @plugin_federatedx_static_target@ noinst_LIBRARIES = @plugin_federatedx_static_target@
libfederatedx_a_CXXFLAGS = $(AM_CFLAGS) libfederatedx_a_CXXFLAGS = $(AM_CXXFLAGS)
libfederatedx_a_CFLAGS = $(AM_CFLAGS)
libfederatedx_a_SOURCES= ha_federatedx.cc federatedx_txn.cc \ libfederatedx_a_SOURCES= ha_federatedx.cc federatedx_txn.cc \
federatedx_io.cc federatedx_io_null.cc \ federatedx_io.cc federatedx_io_null.cc \
federatedx_io_mysql.cc federatedx_io_mysql.cc
......
...@@ -163,8 +163,8 @@ EXTRA_LTLIBRARIES= ha_innodb.la ...@@ -163,8 +163,8 @@ EXTRA_LTLIBRARIES= ha_innodb.la
pkgplugin_LTLIBRARIES= @plugin_innobase_shared_target@ pkgplugin_LTLIBRARIES= @plugin_innobase_shared_target@
ha_innodb_la_LDFLAGS= -module -rpath $(pkgplugindir) ha_innodb_la_LDFLAGS= -module -rpath $(pkgplugindir)
ha_innodb_la_CXXFLAGS= $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS) ha_innodb_la_CXXFLAGS= -shared $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) ha_innodb_la_CFLAGS= -shared $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_la_SOURCES= $(libinnobase_a_SOURCES) ha_innodb_la_SOURCES= $(libinnobase_a_SOURCES)
EXTRA_DIST= CMakeLists.txt plug.in \ EXTRA_DIST= CMakeLists.txt plug.in \
......
...@@ -332,8 +332,8 @@ EXTRA_LTLIBRARIES= ha_innodb_plugin.la ...@@ -332,8 +332,8 @@ EXTRA_LTLIBRARIES= ha_innodb_plugin.la
pkgplugin_LTLIBRARIES= @plugin_innodb_plugin_shared_target@ pkgplugin_LTLIBRARIES= @plugin_innodb_plugin_shared_target@
ha_innodb_plugin_la_LDFLAGS= -module -rpath $(pkgplugindir) ha_innodb_plugin_la_LDFLAGS= -module -rpath $(pkgplugindir)
ha_innodb_plugin_la_CXXFLAGS= $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS) ha_innodb_plugin_la_CXXFLAGS= -shared $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_plugin_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) ha_innodb_plugin_la_CFLAGS= -shared $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_innodb_plugin_la_SOURCES= $(libinnobase_a_SOURCES) ha_innodb_plugin_la_SOURCES= $(libinnobase_a_SOURCES)
EXTRA_DIST= CMakeLists.txt plug.in \ EXTRA_DIST= CMakeLists.txt plug.in \
......
...@@ -40,8 +40,8 @@ libpbxt_la_LDFLAGS = -module ...@@ -40,8 +40,8 @@ libpbxt_la_LDFLAGS = -module
# These are the warning Drizzle uses: # These are the warning Drizzle uses:
# DRIZZLE_WARNINGS = -W -Wall -Wextra -pedantic -Wundef -Wredundant-decls -Wno-strict-aliasing -Wno-long-long -Wno-unused-parameter # DRIZZLE_WARNINGS = -W -Wall -Wextra -pedantic -Wundef -Wredundant-decls -Wno-strict-aliasing -Wno-long-long -Wno-unused-parameter
libpbxt_la_CXXFLAGS = $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN libpbxt_la_CXXFLAGS = -shared $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN
libpbxt_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -std=c99 libpbxt_la_CFLAGS = -shared $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -std=c99
EXTRA_LIBRARIES = libpbxt.a EXTRA_LIBRARIES = libpbxt.a
noinst_LIBRARIES = libpbxt.a noinst_LIBRARIES = libpbxt.a
......
...@@ -333,8 +333,8 @@ EXTRA_LTLIBRARIES= ha_xtradb.la ...@@ -333,8 +333,8 @@ EXTRA_LTLIBRARIES= ha_xtradb.la
pkgplugin_LTLIBRARIES= @plugin_xtradb_shared_target@ pkgplugin_LTLIBRARIES= @plugin_xtradb_shared_target@
ha_xtradb_la_LDFLAGS= -module -rpath $(pkgplugindir) ha_xtradb_la_LDFLAGS= -module -rpath $(pkgplugindir)
ha_xtradb_la_CXXFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) ha_xtradb_la_CXXFLAGS= -shared $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_xtradb_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) ha_xtradb_la_CFLAGS= -shared $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS)
ha_xtradb_la_SOURCES= $(libxtradb_a_SOURCES) ha_xtradb_la_SOURCES= $(libxtradb_a_SOURCES)
EXTRA_DIST= CMakeLists.txt plug.in \ EXTRA_DIST= CMakeLists.txt plug.in \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment