瀏覽代碼

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.
ReinUsesLisp 5 年之前
父節點
當前提交
1e191cc837
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video_core/CMakeLists.txt

+ 1 - 0
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