From: Rich Felker <dalias@libc.org>
To: Michael Forney <mforney@mforney.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [PATCH] mallocng: remove stray ';' at top-level
Date: Tue, 16 Apr 2024 09:45:40 -0400 [thread overview]
Message-ID: <20240416134540.GH4163@brightrain.aerifal.cx> (raw)
In-Reply-To: <4e665a812fb4140908e1c22740afe9dd.mforney@mforney.org>
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
prev parent reply other threads:[~2024-04-16 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 10:26 Michael Forney
2024-04-16 13:45 ` Rich Felker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240416134540.GH4163@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=mforney@mforney.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).