-
-
未解决 [求助]编译还剩最后一个错误
-
发表于: 2019-7-13 17:21 1724
-
static inline char * __attribute__((warn_unused_result)) __ul_returns_nonnull
xstrndup(const char *str, size_t size)
{
char *ret;
if (!str)
return NULL;
// 这个是什么错误 ret = strndup(str, size);
if (!ret)
err(XALLOC_EXIT_CODE, "cannot duplicate string");
return ret;
}
gcc -c hexdump.c
In file included from hexdump.c:59:0:
xalloc.h: In function 'xstrndup':
xalloc.h:83:15: warning: incompatible implicit declaration of built-in function
'strndup' [enabled by default]
ret = strndup(str, size);
xstrndup(const char *str, size_t size)
{
char *ret;
if (!str)
return NULL;
// 这个是什么错误 ret = strndup(str, size);
if (!ret)
err(XALLOC_EXIT_CODE, "cannot duplicate string");
return ret;
}
gcc -c hexdump.c
In file included from hexdump.c:59:0:
xalloc.h: In function 'xstrndup':
xalloc.h:83:15: warning: incompatible implicit declaration of built-in function
'strndup' [enabled by default]
ret = strndup(str, size);
赞赏
他的文章
- [求助]这个是什么壳 1460
- [求助]早期音频处理AU的1.5开放了sdk吗 1508
- 请教一个C++的编译错误 4212
- 有谁对电驴的协议有了解 3254
- [求助]vbs如何发送()键 3353
看原图
赞赏
雪币:
留言: