Skip to content

Commit 02c0df2

Browse files
committed
code: avoid cast warnings
disable SonarQube for now Signed-off-by: Hans Zandbelt <[email protected]>
1 parent 5c4d65b commit 02c0df2

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
12/11/2024
22
- code: loop over authz arrays with index instead of pointer
33
- code: avoid embedding defines in macro arguments
4+
- code: avoid cast warnings
45

56
12/10/2024
67
- github: add SonarQube analysis to Github workflows

src/cache/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static apr_status_t oidc_cache_file_read(request_rec *r, const char *path, apr_f
126126
/*
127127
* write a specified number of bytes from a buffer to a cache file
128128
*/
129-
static apr_status_t oidc_cache_file_write(request_rec *r, const char *path, apr_file_t *fd, void *buf,
129+
static apr_status_t oidc_cache_file_write(request_rec *r, const char *path, apr_file_t *fd, const void *buf,
130130
const apr_size_t len) {
131131

132132
apr_status_t rc = APR_SUCCESS;
@@ -409,7 +409,7 @@ static apr_byte_t oidc_cache_file_set(request_rec *r, const char *section, const
409409
return FALSE;
410410

411411
/* next write the value */
412-
oidc_cache_file_write(r, path, fd, (void *)value, info.len);
412+
oidc_cache_file_write(r, path, fd, (const void *)value, info.len);
413413

414414
/* unlock and close the written file */
415415
apr_file_unlock(fd);

src/handle/logout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ int oidc_logout(request_rec *r, oidc_cfg_t *c, oidc_session_t *session) {
481481
if (apr_table_get(r->subprocess_env, OIDC_REFRESH_TOKENS_BEFORE_LOGOUT_ENVVAR) != NULL) {
482482
oidc_refresh_token_grant(r, c, session, provider, NULL, NULL, &id_token_hint);
483483
} else {
484-
id_token_hint = (char *)oidc_session_get_idtoken(r, session);
484+
id_token_hint = apr_pstrdup(r->pool, oidc_session_get_idtoken(r, session));
485485
}
486486

487487
s_logout_request = apr_pstrdup(r->pool, oidc_cfg_provider_end_session_endpoint_get(provider));

src/handle/response.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ int oidc_response_authorization_post(request_rec *r, oidc_cfg_t *c, oidc_session
719719
}
720720

721721
/* get the parameters */
722-
response_mode = (char *)apr_table_get(params, OIDC_PROTO_RESPONSE_MODE);
722+
response_mode = apr_table_get(params, OIDC_PROTO_RESPONSE_MODE);
723723

724724
/* do the actual implicit work */
725725
return oidc_response_process(r, c, session, params,

0 commit comments

Comments
 (0)