简体   繁体   中英

Unused Entity Issue “Expression result unused” XCode 4 (Clang LLVM)

The following C/C++ code results in an Unused Entity Issue with XCode 4 (Clang LLVM).

void stringMethod(const char *string){
  while(*string!=0){
    *string++;
    //...
  }
}

Its on that line: *string++; so it seems like clang didnt realize that the pointer address is increased? I don't get, how to adjust this code... Any ideas?

尝试删除解引用运算符* ,在增加指针时不需要解引用。

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