mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Add -Wmissing-prototypes to common warnings
This commit is contained in:
parent
d2cb934d28
commit
e2d07d35f4
@ -64,6 +64,7 @@ function(add_warnings_to_targets targets)
|
|||||||
"-Wmissing-braces"
|
"-Wmissing-braces"
|
||||||
"-Wmissing-declarations"
|
"-Wmissing-declarations"
|
||||||
"-Wmissing-noreturn"
|
"-Wmissing-noreturn"
|
||||||
|
"-Wmissing-prototypes"
|
||||||
"-Wmissing-variable-declarations"
|
"-Wmissing-variable-declarations"
|
||||||
"-Wnull-dereference"
|
"-Wnull-dereference"
|
||||||
"-Wold-style-cast"
|
"-Wold-style-cast"
|
||||||
|
@ -26,7 +26,7 @@ namespace bar {
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic ignored "-Wmissing-declarations"
|
#pragma GCC diagnostic ignored "-Wmissing-declarations"
|
||||||
#endif
|
#endif
|
||||||
std::ostream& operator<<(std::ostream& out, foo::helper_1403 const&) {
|
static std::ostream& operator<<(std::ostream& out, foo::helper_1403 const&) {
|
||||||
return out << "[1403 helper]";
|
return out << "[1403 helper]";
|
||||||
}
|
}
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
@ -49,7 +49,7 @@ struct logic_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void throws_int(bool b) {
|
static void throws_int(bool b) {
|
||||||
if (b) {
|
if (b) {
|
||||||
throw 1;
|
throw 1;
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ bool templated_tests(T t) {
|
|||||||
|
|
||||||
struct A {};
|
struct A {};
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &o, const A &) { return o << 0; }
|
static std::ostream &operator<<(std::ostream &o, const A &) { return o << 0; }
|
||||||
|
|
||||||
struct B : private A {
|
struct B : private A {
|
||||||
bool operator==(int) const { return true; }
|
bool operator==(int) const { return true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user