diff mbox series

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); | ^~~~~~

Message ID DM4PR14MB4880E9DA5E6C6A287EB85E77A8A62@DM4PR14MB4880.namprd14.prod.outlook.com (mailing list archive)
State Accepted, archived
Headers show
Series 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); | ^~~~~~ | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint fail 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); | ^~~~~~ 1: T1 Title exceeds max length (216>80): "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); | ^~~~~~"
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-alpine-ci-setupell success Prep - Setup ELL
prestwoj/iwd-ci-setupell success Prep - Setup ELL
prestwoj/iwd-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-alpine-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-testrunner fail test-runner - FAIL: testNetconfig

Commit Message

Kasper Kantz July 12, 2024, 2:30 a.m. UTC
---
 src/p2putil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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);