Skip to content

clarify if MOCKABLE_FUNCTION needs a trailing semicolon or not #260

@pulkomandy

Description

@pulkomandy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions