clarify if MOCKABLE_FUNCTION needs a trailing semicolon or not
- Dominant language
- C
- Stars
- 36
- Forks
- 27
- Avg merge
- 32m
- Merged PRs (30d)
- 3
Description
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the umock-c documentation examples and the requirement wording for MOCKABLE_FUNCTION, comparing examples that include and omit a trailing semicolon. Update the documentation so the required syntax is stated consistently and the examples follow it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100