Webcom C SDK
Some utility macros, functions, ...
#define UNUSED_PARAM(expr)   expr __attribute__ ((unused))
 
#define UNUSED_VAR(name)   (void)(name)
 
#define WC_INLINE   __attribute__((always_inline)) inline
 

Detailed Description

Macro Definition Documentation

◆ UNUSED_PARAM

#define UNUSED_PARAM (   expr)    expr __attribute__ ((unused))

marks a function parameter unused, and avoids compiler warnings

Parameters
exprthe parameter definition

Example:

the compiler won't complain about y not being used:

    int square(int x, UNUSED_PARAM(int y)) {
        return x * x;
    }

◆ UNUSED_VAR

#define UNUSED_VAR (   name)    (void)(name)

marks a variable unused, and avoids compiler warnings

Parameters
namethe variable name

Example:

the compiler won't complain about y not being used:

    int square(int x) {
        int y;
        UNUSED_VAR(y);
        return x * x;
    }

◆ WC_INLINE

#define WC_INLINE   __attribute__((always_inline)) inline