Skip to content

Use PAD_STACK macro and re-enable unused variable linting #1242

@ribbanya

Description

@ribbanya

In placeholder.h:

#ifndef UNUSED
#if defined(__clang__) || defined(__GNUC__)
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
#endif

#define PAD_STACK(bytes)                                                      \
    do {                                                                      \
        UNUSED unsigned char _[(bytes)] = { 0 };                              \
    } while (0);

In compile_flags.txt:

--Wno-unused-but-set-variable
 -Wno-unused-function
 -Wno-unused-parameter
 -Wno-unused-value
--Wno-unused-variable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions