开发者

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

开发者 https://www.devze.com 2023-02-04 01:06 出处:网络
T开发者_Python百科he following C/C++ code results in an Unused Entity Issue with 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

精彩评论

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