Skip to content

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

Closed
@cubicool

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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