← Back to team overview

maria-developers team mailing list archive

Re: bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2787)

 

Michael Widenius <monty@xxxxxxxxxxxx> writes:

> #At lp:maria based on revid:knielsen@xxxxxxxxxxxxxxx-20100105142834-adpbyr6x7edubwps
>
>  2787 Michael Widenius	2010-01-06
>       Removed compiler warnings

This push broke Windows compilation, see below.

>       OpenSolaris 5.11-x86 now compiles (tested with 32 bit)

It still fails in Buildbot.

I am not 100% sure, but I think this is because it fails in 64-bit. When I
looked, I found that there is a check in ./configure to see if we can use
assembler, and then later assembler is used if the configure check was ok. But
there was some difference in CFLAGS or the like between the test and the
use. So I suppose the test is using 32-bit mode (which works) but the use is
using 64-bit mode (which fails). [Not 100% sure about this and also don't know
how to fix ...]

> === modified file 'extra/libevent/devpoll.c'
> --- a/extra/libevent/devpoll.c	2009-03-12 22:27:35 +0000
> +++ b/extra/libevent/devpoll.c	2010-01-06 21:27:53 +0000
> @@ -185,7 +185,9 @@ devpoll_init(struct event_base *base)
>  }
>  
>  static int
> -devpoll_recalc(struct event_base *base, void *arg, int max)
> +devpoll_recalc(struct event_base *base __attribute__((unused)),
> +               void *arg __attribute__((unused)),
> +               int max)

Unfortunately, we cannot do this. __attribute__((unused)) is a GCC
extension. Now that this is pushed to 5.1-release, compilation fails on
Windows:

Building C object extra/libevent/CMakeFiles/libevent.dir/evbuffer.c.obj
evbuffer.c
extra\libevent\evbuffer.c(79) : error C2146: syntax error : missing ')' before identifier '__attribute__'
extra\libevent\evbuffer.c(79) : error C2061: syntax error : identifier '__attribute__'
extra\libevent\evbuffer.c(79) : error C2059: syntax error : ';'
extra\libevent\evbuffer.c(79) : error C2182: 'unused' : illegal use of type 'void'
extra\libevent\evbuffer.c(79) : error C2059: syntax error : 'type'
extra\libevent\evbuffer.c(80) : error C2059: syntax error : ')'

> === modified file 'extra/libevent/evbuffer.c'
> --- a/extra/libevent/evbuffer.c	2009-03-12 22:27:35 +0000
> +++ b/extra/libevent/evbuffer.c	2010-01-06 21:27:53 +0000

> @@ -75,7 +75,8 @@ bufferevent_add(struct event *ev, int ti
>   */
>  
>  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,

Again __attribute__ breaks Windows build.

 - Kristian.



Follow ups

References