Skip to content

Clang Warnings (with -W -Wall -Werror) #175

@cubicool

Description

@cubicool

The no-op, internal strerror_r ends up being unused when compiling with Clang on Linux with all error-reporting and pedantacism enabled. The following error is generated:

cppformat/format.cc:98:37: error: unused function 'strerror_r' [-Werror,-Wunused-function]
static inline fmt::internal::None<> strerror_r(int, char *, ...) {
                                ^
1 error generated.

I found the following link that helps explain the situation somewhat: http://zverovich.net/2015/03/13/reliable-detection-of-strerror-variants.html

For now I'm simply adding -Wno-unused-function, but seeing as I use cppformat like a fiend, it'd be nice to have it fixed in the source. I will submit a PR if desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions