Skip to content
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

clarify if MOCKABLE_FUNCTION needs a trailing semicolon or not #260

Open
pulkomandy opened this issue Aug 5, 2022 · 0 comments
Open

clarify if MOCKABLE_FUNCTION needs a trailing semicolon or not #260

pulkomandy opened this issue Aug 5, 2022 · 0 comments

Comments

@pulkomandy
Copy link

Hello,

I have trouble compiling some code using umock-c. The error I get is:

../provisioning_client/samples/custom_hsm_example/../../deps/utpm/inc/azure_utpm_c/Marshal_fp.h:16:91: error: ISO C does not allow extra ‘;’ outside of a function [-Werror=pedantic]
   16 | MOCKABLE_FUNCTION(, TPM_RC, UINT8_Unmarshal, UINT8*, target, BYTE**, buffer, INT32*, size);

I read the documentation of umock-c and it isn't clear if MOCKABLE_FUNCTION needs that semicolon or not. The documentation uses both in examples, the requirement says calling the macro (without semicolon) should generate a function declaration with semicolon.

I can avoid this problem by removing the pedantic compiler option, so it's not really a problem for me, nonetheless, it seems a good idea to clarify the documentation about this?

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

No branches or pull requests

1 participant