804 Star 2.4K Fork 1.2K

GVPHuawei LiteOS / LiteOS

 / 详情

libc中部分指针定义直接用int或者int32定义,导致在64位芯片移植过程中编译报错,存在指针地址截断

待办的
创建于  
2022-06-27 14:36

该问题是怎么引起的?

libc中部分指针定义直接用int或者int32定义,导致在64位芯片移植过程中编译报错,存在指针地址截断

重现步骤

LiteOS/lib/libc/src/stdio/fflush.c
该文件的int fflush(FILE *f)函数,指针数值定义使用uint32_t及const int定义,建议修改成uintptr_t

LiteOS\lib\libc\src\stdio\fwrite.c
该文件的size_t fwrite(const void * restrict src, size_t size, size_t nmemb, FILE * restrict f)函数,指针数值定义使用uint32_t及const int定义,建议修改成uintptr_t
输入图片说明

LiteOS\lib\libc\src\stdio\putc.c
该文件的int putc(int c, FILE *f)函数,指针数值定义使用uint32_t及const int定义,建议修改成uintptr_t
输入图片说明

报错信息

评论 (0)

endlesslzx 创建了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
C
1
https://gitee.com/LiteOS/LiteOS.git
git@gitee.com:LiteOS/LiteOS.git
LiteOS
LiteOS
LiteOS

搜索帮助