简体   繁体   中英

How to convert warning C4715 to error

I am building cpp files using msys Make.exe , and getting the below warning c:\\ankit_cc\\wm2015git\\wm-cpp\\base\\wmautomator\\base\\wmautomator.cpp(1047) : warning C4715: 'WMAutomator::fetchSerialNumbersBasedOnLpn' : not all control paths return a value ;

I want to make this above warning to error . Please suggest .

Two ways of doing this

  • #pragma warning (error : 4715)

http://msdn.microsoft.com/en-us/library/2c8f766e.aspx

  • Compiling with /we4715 option passed to cl.exe

http://msdn.microsoft.com/en-us/library/thxezb7y.aspx

Pass

/we4715

to the compiler in your makefile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM