简体   繁体   中英

Xcode 4/Warning - Expression result unused

This is my code

#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) ||    defined(__APPLE__)) && !defined(GIAC_VECTOR))
    if (0){ 1; }
#else

How to get rid of the warning?

You can get rid of the warning by making the code do something. The "result" of 1 is never used. Did you mean to assign the 1 to a variable? If not, then the warning is correct. The code doesn't do anything and usually that's an indication that something's wrong with it. What were you trying to accomplish with this code?

注释掉“ if”行(或“ 1”),它根本不做任何事情。

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