Skip to content

Compiler warning with DISABLE_ERROR_LOG defined #1

@cls22

Description

@cls22

Hi,

I am compiling with DISABLE_ERROR_LOG defined.
This causes warnings to occur, since we have werror enabled, the warnings are being elevated to errors.
The issue is there are a lot of places where else blocks (in do_get_nl_link()) contain a single printf line which is being preprocessed away due to the DISABLE_ERROR_LOG. The printf's are not wrapped inside of curly braces, so the compiler is seeing an empty block. This has the potential for introducing bugs if an additional line is added after the printf as it could be seen as part of the else block when DISABLE_ERROR_LOG is defined.
Is it possible to have the else blocks wrapped in curly braces?

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