展开全部

指针类型的赋值。

不同的编译器,e68a843231313335323631343130323136353331333431356566对于不同类型间的指针变量进行赋值的编译检查是不一样的,有的报警告,有的报错误。

例如:

int main()

{

char a[3][6]={"hello", "world"};

char *p;

p=a;

printf("%c\n", *p ); //输出h

return 0;

}

在devC++工具下编译通过,报警告: [Warning] assignment from incompatible pointer type

在VC6工具下,编译出错报错误:error C2440: '=' : cannot convert from 'char [3][6]' to 'char *'   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

扩展资料:

warning: initialization from incompatible pointer type 分析

在字符驱动中,这行代码报了警告信息:

warning: initialization from incompatible pointer type

static ssize_t s3c2440_key_read(struct file *filp, char __user *buf, ssize_t count, loff_t *ppos);

经分析是因为函数声明与函数的原型不符,将其中的:

ssize_t count

改成:

size_t count

就可以了。

同样static void s3c2440_key_release(struct inode *inode, struct file *filp);

将其中的:

void

改成:

int

就可以了。

c语言subscripted_C语言里的 [Warning] assignment from incompatible pointer type 是什么意思啊...相关推荐

  1. warning: initialization from incompatible pointer type error, forbidden解决

    android kernel报错: warning: initialization from incompatible pointer type error, forbidden warning:xx ...

  2. assignment from incompatible pointer type

    因为比较菜 出现这个错误 发现是函数声明写错了 希望对你有帮助 struct inputcommand* 写成了struct inputcommand *

  3. C语言编译报错:incompatible pointer type [-Wincompatible-pointer-types](传参类型不匹配)

    代码: //arnold add 20211213size_t save_video_box_buffer_size = 1920*1080*3/2;char* save_video_box_buff ...

  4. c语言subscripted_c语言。数组的问题。急!

    题目是这样的:Useasingle-subscriptedarraytosolvethefollowingproblem.Readin20numbers,eachofwhichisbetween10a ...

  5. assignment to ‘ *‘ form incompatible pointer type ‘LinkStack‘{aka ‘ *‘}的问题解决

    关于dev上的报错问题1 报错样式 解决方法 报错样式 警告里说:"不能给不同类型的变量赋值" 于是我就ctrl点选了这个波浪线这里,跳转到定义的地方. 一个next结构体成员变量 ...

  6. c语言显示格式错误,C语言,输出里多空格,提交格式错误,怎么改下

    C语言,输出里多空格,提交格式错误,怎么改下 答案:2  信息版本:手机版 解决时间 2020-04-13 03:37 已解决 2020-04-12 07:12 输入n ,然后输入n个字符串,是制定的 ...

  7. R语言安装本地包、Warning in system(cmd) : ‘make‘ not found、安装和R版本匹配的Rtools

    R语言安装本地包.Warning in system(cmd) : 'make' not found.安装和R版本匹配的Rtools 目录 R语言安装本地包.Warning in system(cmd ...

  8. C语言 | C语言深度解剖 ——章节2 符号

    C语言 | C语言深度解剖 --章节2 符号 C语言基本符号表 注释符号 // /* 几个似非而是的注释问题 y=x/*p 出色注释的基本要求 连接符和转义符 \ 单引号.双引号 花括号 运算符 10 ...

  9. 为什么我们需要一门新语言——Go语言

    编程语言已经非常多,偏性能敏感的编译型语言有 C.C++.Java.C#.Delphi和Objective-C等,偏快速业务开发的动态解析型语言有 PHP.Python.Perl.Ruby.JavaS ...

最新文章

  1. CEPH添加MDS操作
  2. python画图代码彩虹-python绘制彩虹图
  3. redis中的hash
  4. PowerDesigner使用教程3
  5. 第三篇:属性_第二节:控件属性在页面及源码中的表示方式
  6. cannot load SAP UI5 application view S2 useful method for resource load
  7. pacf和acf_如何通过Wordpress API,ACF和Express.js使Wordpress更加令人兴奋
  8. 学成在线--11.RabbitMQ快速入门
  9. navicat怎么查看数据库的url_连接数据库url怎么写
  10. B站2021品牌营销手册
  11. 基于Prometheus+Grafana监控SQL Server数据库
  12. SpringBoot 2.1.5(20)---JSON
  13. 12.敏捷估计与规划——Splitting User Stories笔记
  14. Tensorflow初入门
  15. java ant教程_ant教程(三) ant入门
  16. cogs 1811. [NOIP2014]螺旋矩阵
  17. 原生js写简单轮播图方式1-从左向右滑动
  18. 文本识别CRNN模型介绍以及pytorch代码实现
  19. n元均匀直线matlab,均匀直线阵天线的分析
  20. 金税盘时钟异常的处理方法及处理流程

热门文章

  1. Stable Diffusion
  2. 战队口号霸气押韵8字_霸气销售团队激励口号押韵
  3. Photoshop如何使用滤镜之实例演示?
  4. vue使用element-ui的el-date-picker设置样式无效
  5. 大二见习长沙中电软件园
  6. 聚类算法中 K均值聚类(KMeans)的python实现
  7. 建筑物高度数据的获取的几种方法
  8. Codis对比Twemproxy
  9. Timed out waiting for transform from base_footprint to map to become available before running costm
  10. 支付宝 自动发货 php,ecshop 支付宝自动发货接口