pointer/integer type mismatch in conditional expression

前端 未结 1 1211
一向
一向 2021-01-20 21:17
gcc 4.7.2 c89

Hello,

I am getting the following warning:

pointer/integer type mismatch in conditional expression

相关标签:
1条回答
  • 2021-01-20 21:53

    Check whether you have included <string.h> header. If not, the return value of strerror may be considered as an integer value. It would explain why the program runs ok (the linker can find a matched function named strerror, because the C standard library is linked by default), whereas the compiler reports a warning.

    0 讨论(0)
提交回复
热议问题