开发者

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

T开发者_Python百科he 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?


Try to remove the dereferencing operator *, you don't need to dereference the pointer when you increase it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜