Skip to content

Commit

Permalink
code: avoid cast warnings
Browse files Browse the repository at this point in the history
disable SonarQube for now

Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Dec 11, 2024
1 parent 5c4d65b commit 02c0df2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
12/11/2024
- code: loop over authz arrays with index instead of pointer
- code: avoid embedding defines in macro arguments
- code: avoid cast warnings

12/10/2024
- github: add SonarQube analysis to Github workflows
Expand Down
4 changes: 2 additions & 2 deletions src/cache/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static apr_status_t oidc_cache_file_read(request_rec *r, const char *path, apr_f
/*
* write a specified number of bytes from a buffer to a cache file
*/
static apr_status_t oidc_cache_file_write(request_rec *r, const char *path, apr_file_t *fd, void *buf,
static apr_status_t oidc_cache_file_write(request_rec *r, const char *path, apr_file_t *fd, const void *buf,
const apr_size_t len) {

apr_status_t rc = APR_SUCCESS;
Expand Down Expand Up @@ -409,7 +409,7 @@ static apr_byte_t oidc_cache_file_set(request_rec *r, const char *section, const
return FALSE;

/* next write the value */
oidc_cache_file_write(r, path, fd, (void *)value, info.len);
oidc_cache_file_write(r, path, fd, (const void *)value, info.len);

/* unlock and close the written file */
apr_file_unlock(fd);
Expand Down
2 changes: 1 addition & 1 deletion src/handle/logout.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ int oidc_logout(request_rec *r, oidc_cfg_t *c, oidc_session_t *session) {
if (apr_table_get(r->subprocess_env, OIDC_REFRESH_TOKENS_BEFORE_LOGOUT_ENVVAR) != NULL) {
oidc_refresh_token_grant(r, c, session, provider, NULL, NULL, &id_token_hint);
} else {
id_token_hint = (char *)oidc_session_get_idtoken(r, session);
id_token_hint = apr_pstrdup(r->pool, oidc_session_get_idtoken(r, session));
}

s_logout_request = apr_pstrdup(r->pool, oidc_cfg_provider_end_session_endpoint_get(provider));
Expand Down
2 changes: 1 addition & 1 deletion src/handle/response.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ int oidc_response_authorization_post(request_rec *r, oidc_cfg_t *c, oidc_session
}

/* get the parameters */
response_mode = (char *)apr_table_get(params, OIDC_PROTO_RESPONSE_MODE);
response_mode = apr_table_get(params, OIDC_PROTO_RESPONSE_MODE);

/* do the actual implicit work */
return oidc_response_process(r, c, session, params,
Expand Down

0 comments on commit 02c0df2

Please sign in to comment.