|
Message-ID: <20240416134540.GH4163@brightrain.aerifal.cx> Date: Tue, 16 Apr 2024 09:45:40 -0400 From: Rich Felker <dalias@...c.org> To: Michael Forney <mforney@...rney.org> Cc: musl@...ts.openwall.com Subject: Re: [PATCH] mallocng: remove stray ';' at top-level On Mon, Apr 15, 2024 at 03:26:17AM -0700, Michael Forney wrote: > The LOCK_OBJ_DEF macro ends with the closing brace of a > function-definition, which is a complete external-declaration. The > semicolon following the macro use is therefore unnecessary. Empty > declarations are not syntactically valid according to the ISO C > grammar, so remove it. > --- > src/malloc/mallocng/malloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/malloc/mallocng/malloc.c b/src/malloc/mallocng/malloc.c > index d695ab8e..2549eb38 100644 > --- a/src/malloc/mallocng/malloc.c > +++ b/src/malloc/mallocng/malloc.c > @@ -7,7 +7,7 @@ > > #include "meta.h" > > -LOCK_OBJ_DEF; > +LOCK_OBJ_DEF > > const uint16_t size_classes[] = { > 1, 2, 3, 4, 5, 6, 7, 8, > -- > 2.44.0 This looks like a bug in how glue.h was written when mallocng was imported into musl; from the mallocng-draft repo, it's clear that the intent was for the declaration in LOCK_OBJ_DEF not to end in ; so that the code in malloc.c using the macro would be correct. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.