summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra/libevent/event.c2
-rw-r--r--extra/libevent/evutil.h17
-rw-r--r--extra/libevent/kqueue.c9
-rw-r--r--extra/libevent/signal.c2
-rw-r--r--storage/pbxt/src/ha_pbxt.cc2
-rw-r--r--storage/pbxt/src/table_xt.cc8
-rw-r--r--storage/xtradb/handler/i_s.cc2
7 files changed, 30 insertions, 12 deletions
diff --git a/extra/libevent/event.c b/extra/libevent/event.c
index 2042c2de626..07498c709c8 100644
--- a/extra/libevent/event.c
+++ b/extra/libevent/event.c
@@ -405,7 +405,7 @@ event_loopexit_cb(int fd __attribute__((unused)),
int
event_loopexit(struct timeval *tv)
{
- return (event_once(-1, EV_TIMEOUT, event_loopexit_cb,
+ return (event_once(-1, EV_TIMEOUT, &event_loopexit_cb,
current_base, tv));
}
diff --git a/extra/libevent/evutil.h b/extra/libevent/evutil.h
index 2cfcacb2e0e..46e4079715d 100644
--- a/extra/libevent/evutil.h
+++ b/extra/libevent/evutil.h
@@ -171,4 +171,21 @@ ev_int64_t evutil_strtoll(const char *s, char **endptr, int base);
}
#endif
+/* Define __attribute__ for platforms that doesn't suppor it */
+
+#ifndef __attribute__
+# if !defined(__GNUC__)
+# define __attribute__(A)
+# else
+# ifndef GCC_VERSION
+# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+# endif
+# if GCC_VERSION < 2008
+# define __attribute__(A)
+# elif defined(__cplusplus) && GCC_VERSION < 3004
+# define __attribute__(A)
+# endif
+# endif
+#endif
+
#endif /* _EVUTIL_H_ */
diff --git a/extra/libevent/kqueue.c b/extra/libevent/kqueue.c
index eec5a6ab6fb..763236e40ac 100644
--- a/extra/libevent/kqueue.c
+++ b/extra/libevent/kqueue.c
@@ -95,7 +95,7 @@ const struct eventop kqops = {
};
static void *
-kq_init(struct event_base *base)
+kq_init(struct event_base *base __attribute__((unused)))
{
int kq;
struct kqop *kqueueop;
@@ -203,13 +203,14 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
}
static void
-kq_sighandler(int sig)
+kq_sighandler(int sig __attribute__((unused)))
{
/* Do nothing here */
}
static int
-kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
+kq_dispatch(struct event_base *base __attribute__((unused)), void *arg,
+ struct timeval *tv)
{
struct kqop *kqop = arg;
struct kevent *changes = kqop->changes;
@@ -408,7 +409,7 @@ kq_del(void *arg, struct event *ev)
}
static void
-kq_dealloc(struct event_base *base, void *arg)
+kq_dealloc(struct event_base *base __attribute__((unused)), void *arg)
{
struct kqop *kqop = arg;
diff --git a/extra/libevent/signal.c b/extra/libevent/signal.c
index 2df4b2e4a64..ce164f2f5ea 100644
--- a/extra/libevent/signal.c
+++ b/extra/libevent/signal.c
@@ -114,7 +114,7 @@ evsignal_init(struct event_base *base)
evutil_make_socket_nonblocking(base->sig.ev_signal_pair[0]);
event_set(&base->sig.ev_signal, base->sig.ev_signal_pair[1],
- EV_READ | EV_PERSIST, evsignal_cb, &base->sig.ev_signal);
+ EV_READ | EV_PERSIST, &evsignal_cb, &base->sig.ev_signal);
base->sig.ev_signal.ev_base = base;
base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL;
}
diff --git a/storage/pbxt/src/ha_pbxt.cc b/storage/pbxt/src/ha_pbxt.cc
index ef0ae582c07..8640c079a37 100644
--- a/storage/pbxt/src/ha_pbxt.cc
+++ b/storage/pbxt/src/ha_pbxt.cc
@@ -1615,7 +1615,7 @@ static int pbxt_prepare(handlerton *hton, THD *thd, bool all)
static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, const char *thread_name, int *err)
{
THD *thd;
- XTThreadPtr self = NULL;
+ XTThreadPtr volatile self = NULL;
*temp_thread = 0;
if ((thd = current_thd))
diff --git a/storage/pbxt/src/table_xt.cc b/storage/pbxt/src/table_xt.cc
index 8fc6217e183..a9fec660697 100644
--- a/storage/pbxt/src/table_xt.cc
+++ b/storage/pbxt/src/table_xt.cc
@@ -1822,8 +1822,8 @@ xtPublic void xt_tab_check_free_lists(XTThreadPtr self, XTOpenTablePtr ot, bool
}
if (free_count != tab->tab_rec_fnum) {
if (correct_count) {
- tab->tab_rec_fnum = free_count;
- tab->tab_head_rec_fnum = free_count;
+ tab->tab_rec_fnum = (uint) free_count;
+ tab->tab_head_rec_fnum = (uint) free_count;
tab->tab_flush_pending = TRUE;
xt_logf(XT_NT_INFO, "Table %s: free record count (%llu) has been set to the number of records on the list: %llu\n", table_name, (u_llong) tab->tab_rec_fnum, (u_llong) free_count);
}
@@ -1875,8 +1875,8 @@ xtPublic void xt_tab_check_free_lists(XTThreadPtr self, XTOpenTablePtr ot, bool
* The correct way to do this at run time would be to add the change to the
* transaction log, so that it is applied by the writer.
*/
- tab->tab_row_fnum = free_count;
- tab->tab_head_row_fnum = free_count;
+ tab->tab_row_fnum = (uint) free_count;
+ tab->tab_head_row_fnum = (uint) free_count;
tab->tab_flush_pending = TRUE;
xt_logf(XT_NT_INFO, "Table %s: free row count (%llu) has been set to the number of rows on the list: %llu\n", table_name, (u_llong) tab->tab_row_fnum, (u_llong) free_count);
}
diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc
index 07ee7debca7..d90afc6dbc4 100644
--- a/storage/xtradb/handler/i_s.cc
+++ b/storage/xtradb/handler/i_s.cc
@@ -763,7 +763,7 @@ i_s_innodb_buffer_pool_pages_index_fill(
if (fil_page_get_type(frame) == FIL_PAGE_INDEX) {
index_id = btr_page_get_index_id(frame);
- table->field[0]->store(ut_conv_dulint_to_longlong(index_id));
+ table->field[0]->store(ut_conv_dulint_to_longlong(index_id), 0);
table->field[1]->store(block->page.space);
table->field[2]->store(block->page.offset);
table->field[3]->store(page_get_n_recs(frame));