警告:类型为“unsigned char*”的参数与类型为“char*”的参数不兼容
[复制链接]
- #define F_CPU 1000000UL
- #include <ioavr.h>
- #include "delay.h"
- #include <string.h>
- #include <stdio.h>
- #define INT8U unsigned char
- #define INT16U unsigned int
-
-
- extern void Initialize_LCD();
- extern void LCD_ShowString(INT8U x, INT8U y,char *str);
-
- extern void GetDateTime();
- extern INT8U DateTime[];
- extern char *WEEK[];
-
-
-
- INT8U LCD_BUF_1[] = "DATE 00-00-00 ";
- INT8U LCD_BUF_2[] = "TIME 00:00:00 ";
-
- char LCD_DSY_BUFFER[17];
-
-
-
-
-
-
-
-
- void Format_DateTime(INT8U d, INT8U *a)
- {
-
-
-
-
-
-
-
- *a = d / 10 + '0'; *(a+1) = d % 10 + '0';
- }
-
-
-
-
- int main()
- {
- DDRA = 0xFF;
- DDRC = 0xFF; DDRD = 0xFF;
- Initialize_LCD();
- while(1)
- {
- GetDateTime();
-
- Format_DateTime(DateTime[6], LCD_BUF_1 + 5);
- Format_DateTime(DateTime[4], LCD_BUF_1 + 8);
- Format_DateTime(DateTime[3], LCD_BUF_1 + 11);
-
- strcpy(LCD_BUF_1 + 13, WEEK[DateTime[5] - 1]);
-
-
- Format_DateTime(DateTime[2], LCD_BUF_2 + 5);
- Format_DateTime(DateTime[1], LCD_BUF_2 + 8);
- Format_DateTime(DateTime[0], LCD_BUF_2 + 11);
-
- LCD_ShowString(0, 0, LCD_BUF_1);
- LCD_ShowString(0, 1, LCD_BUF_2);
- }
- }
-
程序出现3个警告 类型为“unsigned char*”的参数与类型为“char*”的参数不兼容
strcpy(LCD_BUF_1 + 13, WEEK[DateTime[5] - 1]);
LCD_ShowString(0, 0, LCD_BUF_1);
LCD_ShowString(0, 1, LCD_BUF_2);
应该是 INT8U LCD_BUF_1 设置不对 请教应该怎么改
|