From: Denis Kenzior <denkenz@gmail.com>
To: "dangling ." <kasperkantz@outlook.com>,
"iwd@lists.linux.dev" <iwd@lists.linux.dev>
Subject: Re: [PATCH] main: remove static from const strlen
Date: Fri, 12 Jul 2024 11:09:25 -0500 [thread overview]
Message-ID: <59f20eb3-7f41-47fe-9010-9ac4f9a48fd6@gmail.com> (raw)
In-Reply-To: <DM4PR14MB4880D5598D181E5FE126C54BA7A62@DM4PR14MB4880.namprd14.prod.outlook.com>
Hi,
On 7/11/24 7:33 PM, dangling . wrote:
> From bc0f427f81b5b25f1c706c66e455dc9ea5686266 Mon Sep 17 00:00:00 2001
> From: kasper <kasperkantz@outlook.com>
I need a full name in order to accept this patch.
> Date: Fri, 12 Jul 2024 00:23:56 +0000
> Subject: [PATCH] main: remove static from const strlen To fix this error:
> src/p2putil.c: In function 'p2p_get_random_string': src/p2putil.c:2641:37:
> error: initializer element is not constant 2641 | static const int
> set_size = strlen(CHARSET); |
> ^~~~~~
>
> ---
> src/p2putil.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Why did you send 3 of the same one?
> diff --git a/src/p2putil.c b/src/p2putil.c
> index d1f114d0..ef0f988c 100644
> --- a/src/p2putil.c
> +++ b/src/p2putil.c
> @@ -2638,7 +2638,7 @@ void p2p_get_random_string(char *buf, size_t len)
> {
> #define CHARSET "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" \
> "0123456789"
> - static const int set_size = strlen(CHARSET);
> + const int set_size = strlen(CHARSET);
>
> l_getrandom(buf, len);
>
> --
> 2.45.2
Regards,
-Denis
next prev parent reply other threads:[~2024-07-12 16:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 0:33 [PATCH] main: remove static from const strlen dangling .
2024-07-12 2:30 ` [PATCH] [PATCH] main: remove static from const strlen src/p2putil.c: In function 'p2p_get_random_string': src/p2putil.c:2641:37: error: initializer element is not constant 2641 | static const int set_size = strlen(CHARSET); | ^~~~~~ kasper
2024-07-12 4:08 ` [PATCH] [PATCH] main: remove static from const strlen kasper
2024-07-12 16:09 ` Denis Kenzior [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-07-12 19:32 Kasper Kantz
2024-07-12 21:25 ` Denis Kenzior
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=59f20eb3-7f41-47fe-9010-9ac4f9a48fd6@gmail.com \
--to=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
--cc=kasperkantz@outlook.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox