Skip to content

Fix declaration of ica_aes_gcm_kma_ctx_new in ica_api.h header #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

ifranzki
Copy link
Contributor

When building an application that includes ica_api.h with -Wstrict-prototypes, then this shows warnings/errors for the ica_aes_gcm_kma_ctx_new() declaration in ica_api.h.

The declaration in ica_api.h is anyway different that the one used in ica_api.c:

ica_api.h:

  ICA_EXPORT
  kma_ctx* ica_aes_gcm_kma_ctx_new();

ica_api.c:
kma_ctx* ica_aes_gcm_kma_ctx_new(void)

When building an application that includes ica_api.h with -Wstrict-prototypes,
then this shows warnings/errors for the ica_aes_gcm_kma_ctx_new() declaration
in ica_api.h.

The declaration in ica_api.h is anyway different that the one used in
ica_api.c:

ica_api.h:
  ICA_EXPORT
  kma_ctx* ica_aes_gcm_kma_ctx_new();

ica_api.c:
  kma_ctx* ica_aes_gcm_kma_ctx_new(void)

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
@ifranzki ifranzki requested a review from jschmidb April 28, 2025 07:50
Copy link
Contributor

@jschmidb jschmidb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Was this the only place with such a mismatch?

@ifranzki
Copy link
Contributor Author

It was the only place in the external header file.

Inside libica code there are more places with empty arguments functions. As long as libica itself is not built with -Wstrict-prototypes this does not hurt.

@ifranzki
Copy link
Contributor Author

@jschmidb do you want to merge this?

@jschmidb jschmidb merged commit 57949c4 into opencryptoki:master Apr 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants