Sweep out some extra warnings

Swept:
`-Wpadded` in some places (where it caused extra size, instead of just
saying "hey, we padded struct at the end to align, just as standard says")
`-Wweak-vtables` everywhere (Clang)
`-Wexit-time-destructors` everywhere (Clang)
`-Wmissing-noreturn` everywhere (Clang)

The last three are enabled for Clang compilation going forward.

Also enabled `-Wunreachable-code` for Clang and GCC
This commit is contained in:
Martin Hořeňovský 2017-09-07 16:51:33 +02:00
parent 6105282c4f
commit 9aa96712ae
61 changed files with 319 additions and 182 deletions

View file

@ -5,12 +5,20 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wexit-time-destructors"
#endif
#include "catch_stringref.h"
#include <ostream>
#include <cassert>
#include <cstring>
namespace Catch {
auto getEmptyStringRef() -> StringRef {
@ -160,3 +168,7 @@ namespace Catch {
}
} // namespace Catch
#if defined(__clang__)
# pragma clang diagnostic pop
#endif