mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-30 19:57:10 +01:00 
			
		
		
		
	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:
		| @@ -14,7 +14,10 @@ | ||||
| #include <stdexcept> | ||||
| #include <memory> | ||||
|  | ||||
| CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS | ||||
| #if defined(__clang__) | ||||
| #    pragma clang diagnostic push | ||||
| #    pragma clang diagnostic ignored "-Wexit-time-destructors" | ||||
| #endif | ||||
|  | ||||
| namespace Catch { | ||||
| namespace TestCaseTracking { | ||||
| @@ -25,6 +28,8 @@ namespace TestCaseTracking { | ||||
|     {} | ||||
|  | ||||
|  | ||||
|     ITracker::~ITracker() = default; | ||||
|  | ||||
|  | ||||
|     TrackerContext& TrackerContext::instance() { | ||||
|         static TrackerContext s_instance; | ||||
| @@ -276,4 +281,6 @@ using TestCaseTracking::IndexTracker; | ||||
|  | ||||
| } // namespace Catch | ||||
|  | ||||
| CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS | ||||
| #if defined(__clang__) | ||||
| #    pragma clang diagnostic pop | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský