Skip to content

Commit

Permalink
Fix clang warnings (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed May 26, 2016
1 parent f7abf9f commit 6b3c00e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions fmt/format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,13 @@ class CharConverter : public ArgVisitor<CharConverter, void> {
};
} // namespace

FMT_FUNC FormatError::~FormatError() {}
FMT_FUNC SystemError::~SystemError() {}

namespace internal {

FMT_FUNC RuntimeError::~RuntimeError() {}

// This method is used to preserve binary compatibility with fmt 3.0.
// It can be removed in 4.0.
FMT_FUNC void format_system_error(
Expand Down
5 changes: 4 additions & 1 deletion fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ typedef __int64 intmax_t;

#if defined(__clang__) && !defined(FMT_ICC_VERSION)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation"
# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#ifdef __GNUC_LIBSTD__
Expand Down Expand Up @@ -538,6 +538,7 @@ class FormatError : public std::runtime_error {
public:
explicit FormatError(CStringRef message)
: std::runtime_error(message.c_str()) {}
~FormatError() FMT_NOEXCEPT;
};

namespace internal {
Expand Down Expand Up @@ -1316,6 +1317,7 @@ struct NamedArg : Arg {
class RuntimeError : public std::runtime_error {
protected:
RuntimeError() : std::runtime_error("") {}
~RuntimeError() FMT_NOEXCEPT;
};

template <typename Char>
Expand Down Expand Up @@ -2278,6 +2280,7 @@ class SystemError : public internal::RuntimeError {
init(error_code, message, ArgList());
}
FMT_VARIADIC_CTOR(SystemError, init, int, CStringRef)
~SystemError() FMT_NOEXCEPT;

int error_code() const { return error_code_; }
};
Expand Down

0 comments on commit 6b3c00e

Please sign in to comment.