diff options
author | Michael Widenius <monty@askmonty.org> | 2010-01-06 21:20:16 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-01-06 21:20:16 +0200 |
commit | f83113df07d6ef8e8a6d1db8f6dc3bb90fb0652a (patch) | |
tree | dd61d137ac567ebd15d245f0d24a12e763f78545 /extra | |
parent | 43ddd3b89ffea24147332f95fb7c8929d2873e63 (diff) | |
download | mariadb-git-f83113df07d6ef8e8a6d1db8f6dc3bb90fb0652a.tar.gz |
Applied Antony T Curtis patch for declaring many CHARSET objects as const
Removed compiler warnings
extra/libevent/epoll.c:
Removed compiler warnings
extra/libevent/evbuffer.c:
Removed compiler warnings
extra/libevent/event.c:
Removed compiler warnings
extra/libevent/select.c:
Removed compiler warnings
extra/libevent/signal.c:
Removed compiler warnings
include/m_ctype.h:
Define CHARSET_INFO, MY_CHARSET_HANDLER, MY_COLLATION_HANDLER, MY_UNICASE_INFO, MY_UNI_CTYPE and MY_UNI_IDX as const structures.
Declare that pointers point to const data
include/m_string.h:
Declare that pointers point to const data
include/my_sys.h:
Redefine variables and function prototypes
include/mysql.h:
Declare charset as const
include/mysql.h.pp:
Declare charset as const
include/mysql/plugin.h:
Declare charset as const
include/mysql/plugin.h.pp:
Declare charset as const
mysys/charset-def.c:
Charset can't be of type CHARSET_INFO as they are changed when they are initialized.
mysys/charset.c:
Functions that change CHARSET_INFO must use 'struct charset_info_st'
Add temporary variables to not have to change all_charsets[] (Which now is const)
sql-common/client.c:
Added cast to const
sql/item_cmpfunc.h:
Added cast to avoid compiler error.
sql/sql_class.cc:
Added cast to const
sql/sql_lex.cc:
Added cast to const
storage/maria/ma_ft_boolean_search.c:
Added cast to avoid compiler error.
storage/maria/ma_ft_parser.c:
Added cast to avoid compiler error.
storage/maria/ma_search.c:
Added cast to const
storage/myisam/ft_boolean_search.c:
Added cast to avoid compiler error
storage/myisam/ft_parser.c:
Added cast to avoid compiler error
storage/myisam/mi_search.c:
Added cast to const
storage/pbxt/src/datadic_xt.cc:
Added cast to const
storage/pbxt/src/ha_pbxt.cc:
Added cast to const
Removed compiler warning by changing prototype of XTThreadPtr()
storage/pbxt/src/myxt_xt.h:
Character sets should be const
storage/pbxt/src/xt_defs.h:
Character sets should be const
storage/xtradb/btr/btr0cur.c:
Removed compiler warning
strings/conf_to_src.c:
Added const
Functions that change CHARSET_INFO must use 'struct charset_info_st'
strings/ctype-big5.c:
Made arrays const
strings/ctype-bin.c:
Made arrays const
strings/ctype-cp932.c:
Made arrays const
strings/ctype-czech.c:
Made arrays const
strings/ctype-euc_kr.c:
Made arrays const
strings/ctype-eucjpms.c:
Made arrays const
strings/ctype-extra.c:
Made arrays const
strings/ctype-gb2312.c:
Made arrays const
strings/ctype-gbk.c:
Made arrays const
strings/ctype-latin1.c:
Made arrays const
strings/ctype-mb.c:
Made arrays const
strings/ctype-simple.c:
Made arrays const
strings/ctype-sjis.c:
Made arrays const
strings/ctype-tis620.c:
Made arrays const
strings/ctype-uca.c:
Made arrays const
strings/ctype-ucs2.c:
Made arrays const
strings/ctype-ujis.c:
Made arrays const
strings/ctype-utf8.c:
Made arrays const
strings/ctype-win1250ch.c:
Made arrays const
strings/ctype.c:
Made arrays const
Added cast to const
Functions that change CHARSET_INFO must use 'struct charset_info_st'
strings/int2str.c:
Added cast to const
Diffstat (limited to 'extra')
-rw-r--r-- | extra/libevent/epoll.c | 3 | ||||
-rw-r--r-- | extra/libevent/evbuffer.c | 3 | ||||
-rw-r--r-- | extra/libevent/event.c | 3 | ||||
-rw-r--r-- | extra/libevent/select.c | 4 | ||||
-rw-r--r-- | extra/libevent/signal.c | 2 |
5 files changed, 9 insertions, 6 deletions
diff --git a/extra/libevent/epoll.c b/extra/libevent/epoll.c index de10dac2425..7c8c60bdffa 100644 --- a/extra/libevent/epoll.c +++ b/extra/libevent/epoll.c @@ -155,7 +155,8 @@ epoll_init(struct event_base *base) } static int -epoll_recalc(struct event_base *base, void *arg, int max) +epoll_recalc(struct event_base *base __attribute__((unused)), + void *arg, int max) { struct epollop *epollop = arg; diff --git a/extra/libevent/evbuffer.c b/extra/libevent/evbuffer.c index abd6a942431..33315120c3e 100644 --- a/extra/libevent/evbuffer.c +++ b/extra/libevent/evbuffer.c @@ -75,7 +75,8 @@ bufferevent_add(struct event *ev, int timeout) */ void -bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now, +bufferevent_read_pressure_cb(struct evbuffer *buf, + size_t old __attribute__((unused)), size_t now, void *arg) { struct bufferevent *bufev = arg; /* diff --git a/extra/libevent/event.c b/extra/libevent/event.c index e96c1b6a3ab..2042c2de626 100644 --- a/extra/libevent/event.c +++ b/extra/libevent/event.c @@ -394,7 +394,8 @@ event_base_get_method(struct event_base *base) } static void -event_loopexit_cb(int fd, short what, void *arg) +event_loopexit_cb(int fd __attribute__((unused)), + short what __attribute__((unused)), void *arg) { struct event_base *base = arg; base->event_gotterm = 1; diff --git a/extra/libevent/select.c b/extra/libevent/select.c index 54078777ac3..b8bd1a1c361 100644 --- a/extra/libevent/select.c +++ b/extra/libevent/select.c @@ -266,7 +266,7 @@ select_add(void *arg, struct event *ev) * of the fd_sets for select(2) */ if (sop->event_fds < ev->ev_fd) { - int fdsz = sop->event_fdsz; + unsigned int fdsz = sop->event_fdsz; if (fdsz < sizeof(fd_mask)) fdsz = sizeof(fd_mask); @@ -275,7 +275,7 @@ select_add(void *arg, struct event *ev) (howmany(ev->ev_fd + 1, NFDBITS) * sizeof(fd_mask))) fdsz *= 2; - if (fdsz != sop->event_fdsz) { + if (fdsz != (unsigned int) sop->event_fdsz) { if (select_resize(sop, fdsz)) { check_selectop(sop); return (-1); diff --git a/extra/libevent/signal.c b/extra/libevent/signal.c index 964ae37fed2..c4a1d0da167 100644 --- a/extra/libevent/signal.c +++ b/extra/libevent/signal.c @@ -69,7 +69,7 @@ static void evsignal_handler(int sig); /* Callback for when the signal handler write a byte to our signaling socket */ static void -evsignal_cb(int fd, short what, void *arg) +evsignal_cb(int fd, short what __attribute((unused)), void *arg __attribute((unused))) { static char signals[100]; #ifdef WIN32 |