REGISTER_UMOCK_VALUE_TYPE does not work.
- Dominant language
- C
- Stars
- 36
- Forks
- 27
- Avg merge
- 32m
- Merged PRs (30d)
- 3
Description
```c
static char* umockvalue_stringify_BSDL_INDEX_INVARIANT(const BSDL_INDEX_INVARIANT* value)
{
return sprintf_char(PRI_BSDL_INDEX_INVARIANT, BSDL_INDEX_INVARIANT_VALUES(*value));
}
static int umockvalue_are_equal_BSDL_INDEX_INVARIANT(const BSDL_INDEX_INVARIANT* left, const BSDL_INDEX_INVARIANT* right)
{
return (
(left->xlog_epoch == right->xlog_epoch) &&
(left->xtail_gen_id == right->xtail_gen_id)
);
}
int umockvalue_copy_BSDL_INDEX_INVARIANT(BSDL_INDEX_INVARIANT* destination, const BSDL_INDEX_INVARIANT* source)
{
*destination = *source;
}
static void umockvalue_free_BSDL_INDEX_INVARIANT(BSDL_INDEX_INVARIANT* value)
{
(void)value;
}
[...]
REGISTER_UMOCK_VALUE_TYPE(BSDL_INDEX_INVARIANT, umockvalue_stringify_BSDL_INDEX_INVARIANT, are_equal_func_BSDL_INDEX_INVARIANT, copy_func_BSDL_INDEX_INVARIANT, free_func_BSDL_INDEX_INVARIANT);
```
does not compile, says:
warning C4210: nonstandard extension used: function given file scope
Best Regards,
Andrei Porumb
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect the definition and expansion of REGISTER_UMOCK_VALUE_TYPE, then reproduce the C4210 warning using the BSDL_INDEX_INVARIANT example in the issue. Confirm the expected registration form and verify that the example compiles without the warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100