← Back to team overview

maria-developers team mailing list archive

Re: 19fbfab084f: Compilation fix

 

Hi, Aleksey!

On Sep 01, Aleksey Midenkov wrote:
> On Wed, Sep 1, 2021 at 3:46 PM Sergei Golubchik <serg@xxxxxxxxxxx> wrote:
> 
> Here
> 
> #define DBUG_SUICIDE()                  do { } while(0)
> 
> DBUG_SUICIDE is not an expression. It's a statement and cannot be used
> in expression.

But that's a bug. Every DBUG_xxx macro is defined at least twice, for
dbug and non-dbug builds. All definitions must be either expressions or
statements, it cannot arbitrary switch from a statement to an
expression or vice versa.

In debug builds it's defined as

  #define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())

so it must be defined as an expression in non-dbug builds too.

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx


References