summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-11-27 00:37:34 +0200
committerMichael Widenius <monty@askmonty.org>2010-11-27 00:37:34 +0200
commit9ab4829bc6d37e0ffacc016ce09351e9bde8cf81 (patch)
tree6d2322142123186d4b150e50f2c06cf513b196f4 /extra
parentb8b3716ae029f2c550e1ec0b1e50ac01aabf5dc5 (diff)
downloadmariadb-git-9ab4829bc6d37e0ffacc016ce09351e9bde8cf81.tar.gz
Fixed compiler warnings and a compilation failure on windows
extra/libevent/event.c: Tried to fix compiler warning on windows extra/libevent/evutil.h: Define __attribute__ for not gcc compilers extra/libevent/kqueue.c: Fixed compiler warnings extra/libevent/signal.c: Tried to fix compiler warning on windows storage/pbxt/src/ha_pbxt.cc: Fixed compiler warning about "variable might be clobbered by longjmp" storage/pbxt/src/table_xt.cc: Fixed compiler warnings (on windows) storage/xtradb/handler/i_s.cc: Fixed compiler warning by invoking the correct store function.
Diffstat (limited to 'extra')
-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
4 files changed, 24 insertions, 6 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;
}