From 1e191cc837cf9ff38e5d5566919be54654d185b9 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 24 Dec 2020 21:01:23 -0300 Subject: video_core: Enforce C4715 (not all control paths return a value) Most of the time people write code that always returns a value, terminates execution, throws an exception, or uses an unconventional jump primitive. This is not always true when we build without asserts on mainline builds. To avoid introducing undefined behavior on our most used builds, enforce this warning signalling an error and stopping the build from shipping. --- src/video_core/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index a021d61f5..90f533730 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -303,6 +303,7 @@ if (MSVC) /we4457 # Declaration of 'identifier' hides function parameter /we4458 # Declaration of 'identifier' hides class member /we4459 # Declaration of 'identifier' hides global declaration + /we4715 # 'function' : not all control paths return a value ) else() target_compile_options(video_core PRIVATE -- cgit v1.2.3