From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 2AC1F24A61 for ; Tue, 16 Apr 2024 15:47:10 +0200 (CEST) Received: (qmail 5926 invoked by uid 550); 16 Apr 2024 13:45:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 5835 invoked from network); 16 Apr 2024 13:45:28 -0000 Date: Tue, 16 Apr 2024 09:45:40 -0400 From: Rich Felker To: Michael Forney Cc: musl@lists.openwall.com Message-ID: <20240416134540.GH4163@brightrain.aerifal.cx> References: <4e665a812fb4140908e1c22740afe9dd.mforney@mforney.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e665a812fb4140908e1c22740afe9dd.mforney@mforney.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [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