作者: 51hei团团 时间: 2021-4-6 14:59
贴错误截图看看,大家都是手机上的论坛无法下载编译作者: zlkj 时间: 2021-4-6 15:25
compiling main.c...
main.c(253): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
res=mf_open((char *)spr_name,FA_READ);//只读打开
main.c(447): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
if(mf_open(spr_buf,FA_OPEN_EXISTING)==FR_OK)
main.c(448): warning: #167-D: argument of type "char *" is incompatible with parameter of type "const u8 *"
ai_load_picfile(spr_buf,60,100,150,250,1); //显示图片1
main.c(461): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
if(mf_open(spr_buf,FA_OPEN_EXISTING)==FR_OK)
main.c(462): warning: #167-D: argument of type "char *" is incompatible with parameter of type "const u8 *"
ai_load_picfile(spr_buf,280,100,150,250,1);
main.c(477): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
if(mf_open(spr_buf,FA_OPEN_EXISTING)==FR_OK)
main.c(478): warning: #167-D: argument of type "char *" is incompatible with parameter of type "const u8 *"
ai_load_picfile(spr_buf,60,450,150,250,1);//显示图片3
main.c(492): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
if(mf_open(spr_buf,FA_OPEN_EXISTING)==FR_OK)
main.c(493): warning: #167-D: argument of type "char *" is incompatible with parameter of type "const u8 *"
ai_load_picfile(spr_buf,280,450,150,250,1);//显示图片4
main.c(702): warning: #940-D: missing return statement at end of non-void function "lcd_dis_files"
}
main.c(959): warning: #170-D: pointer points outside of underlying object
if(strncmp(txt_pathname[key-1]-4+strlen(txt_pathname[key-1]),".txt",4)==0)
main.c(1007): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "const char *"
if(strcmp(path,txt_path_name[ i])==0)
main.c(1007): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "const char *"
if(strcmp(path,txt_path_name[ i])==0)
main.c(1011): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "char *restrict"
strcpy(txt_path_name[j],txt_path_name[j+1]);
main.c(1011): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "const char *restrict"
strcpy(txt_path_name[j],txt_path_name[j+1]) 作者: 聆烟雨 时间: 2021-4-7 14:51
我编译了一下 "..\OBJ\HZ.axf" - 0 Error(s), 18 Warning(s) : 没有错误,全是警告。 这是原子的代码吗? 如果是的话, 写代码就有些不负责任了,这是教学用的,要严谨一点。 不能没错误就完事了。
function "mf_open" declared implicitly 解决方法: main.c 头部增加 #include "fattester.h"
然后再编译, 15个警告
missing return statement at end of non-void function "lcd_dis_files" 解决方法: lcd_dis_files 函数最后加上 return 0;