![](/img/trans.png)
[英]warning C4715: 'operator==' : not all control paths return a value
[英]How to convert warning C4715 to error
我正在使用msys Make.exe構建cpp文件,並收到以下警告c:\\ ankit_cc \\ wm2015git \\ wm-cpp \\ base \\ wmautomator \\ base \\ wmautomator.cpp(1047):警告C4715:'WMAutomator :: fetchSerialNumbersBasedOnLpn':並非所有的控制路徑都返回一個值;
我想使以上警告成為錯誤。 請提出建議。
兩種方法
#pragma warning (error : 4715)
http://msdn.microsoft.com/en-us/library/2c8f766e.aspx
cl.exe
/we4715
選項進行編譯 通過
/we4715
生成文件中的編譯器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.