zoukankan      html  css  js  c++  java
  • 如何解决passing argument 1 of 'LCD_DrawPic' discards qualifiers from pointer target type

    在编译ourdev网友“Green Sheep 绿羊”的TFT测试文件时,出现诸如passing argument 1 of 'LCD_DrawPic' discards qualifiers from pointer target type的警告,双击此警告来到main.c文件中的LCD_DrawPic(Image1)一行。

    经检查发现Image1 定义为const unsigned char 类型,而LCD_DrawPic函数的地方定义的是void LCD_DrawPic(unsigned char *data),两者定义不一致,将void LCD_DrawPic(unsigned char *data)修改为void LCD_DrawPic(const unsigned char *data),同样修改tft.h中的相应位置,重新编译,该警告消失。

  • 相关阅读:
    hdoj:2033
    hdoj:2032
    hdoj:2031
    hdoj:2029
    hdoj:2028
    hdoj:2027
    hdoj:2024
    hdoj:2023
    hdoj:2022
    hdoj:题目分类
  • 原文地址:https://www.cnblogs.com/nios_ii/p/2206550.html
Copyright © 2011-2022 走看看