diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml.save similarity index 100% rename from .github/workflows/sonarqube.yml rename to .github/workflows/sonarqube.yml.save diff --git a/ChangeLog b/ChangeLog index 6140567a..b07bf002 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/cache/file.c b/src/cache/file.c index 894fd2af..06902da0 100644 --- a/src/cache/file.c +++ b/src/cache/file.c @@ -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; @@ -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); diff --git a/src/handle/logout.c b/src/handle/logout.c index 4647d159..626dd4fc 100644 --- a/src/handle/logout.c +++ b/src/handle/logout.c @@ -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)); diff --git a/src/handle/response.c b/src/handle/response.c index e70a2fd4..2dd949b7 100644 --- a/src/handle/response.c +++ b/src/handle/response.c @@ -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,