您当前的位置: 首页 >  ar

柳鲲鹏

暂无认证

  • 0浏览

    0关注

    4642博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

编译OpenJDK8:specified bound depends on the length of the source argument

柳鲲鹏 发布时间:2020-08-08 08:50:01 ,浏览量:0

  详细错误如下:

/home/tsrj/tsjdk8-project/tsjdk8-252/hotspot/src/share/vm/runtime/arguments.cpp: In static member function ‘static void Arguments::fix_appclasspath()’:
/home/tsrj/tsjdk8-project/tsjdk8-252/hotspot/src/share/vm/runtime/arguments.cpp:3459:12: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
     strncpy(copy, src, strlen(src) + 1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

  代码看起来没问题,所以去掉报错即可:

make/linux/makefiles/gcc.make:204

注释掉WARNINGS_ARE_ERRORS = -Werror

关注
打赏
1665724893
查看更多评论
立即登录/注册

微信扫码登录

0.2187s