Created by: ityuhui
If we call apiClient_invoke
with some const char *
as parameters of the function, ( the complete source code is https://github.com/kubernetes-client/c/blob/master/kubernetes/src/generic.c) then there are some warnings while compiling the C client library.
src/generic.c:57:38: warning: passing argument 2 of ‘apiClient_invoke’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
apiClient_invoke(client->client, path, queryParameters, headerParameters, formParameters, headerType, contentType, body, method);
^~~~
In file included from src/generic.c:1:0:
src/../include/apiClient.h:43:6: note: expected ‘char *’ but argument is of type ‘const char *’
void apiClient_invoke(apiClient_t *apiClient,char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters,list_t *headerType,list_t *contentType, char *bodyParameters, char *requestType);
This PR eliminates these compiler warnings.
@wing328 @zhemant @michelealbano
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
Run the following to build the project and update samples: ./mvnw clean package ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh
./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.