首页
社区
课程
招聘
未解决 [求助]编译还剩最后一个错误
发表于: 2019-7-13 17:21 1724

未解决 [求助]编译还剩最后一个错误

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);

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回
//