Skip to content

Commit 0dcba07

Browse files
committed
Fix use of strchr with new GCC
According to C specification, 7.28.5.1, strchr() is a generic function and its string argument's type is promoted to the result. So if it is const char*, the result will be const char* as well. gcc in Fedora Rawhide (15.2.1 20251111 or later) implements this conformance, resulting in a compilation fail with -Werror=discarded-qualifiers. Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
1 parent e11e179 commit 0dcba07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/jose.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ char *oauth2_jose_jwt_header_peek(oauth2_log_t *log,
993993
{
994994
char *input = NULL, *result = NULL;
995995
json_t *json = NULL;
996-
char *p = NULL;
996+
const char *p = NULL;
997997
size_t result_len;
998998
char *rv = NULL;
999999

0 commit comments

Comments
 (0)