warning: passing argument 2 of 'get_reboot_reason' from incompatible pointer type
这类警告是函数类型 有差异,需要强制转换。
如:
iconv(cd, &inbuf, ,&inlen, &outbuf, &outlen);
改为:
改为:
iconv(cd, (const char **)&inbuf, ,&inlen, &outbuf, &outlen);
本文介绍了一种常见的编译警告,即函数类型不匹配导致的问题,并提供了一个具体的修改实例,展示了如何通过类型转换来修正此类警告。
2760
1389
412
5892

被折叠的 条评论
为什么被折叠?