1:现象

编译时突然出现很多莫名的错误

n file included from /tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.9.4/include/stdint.h:9:0,from ./common/log.h:15,from mqtt/mqtt_client.c:18:
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h: In function 'mqtt_init':
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:48:24: error: storage class specified for parameter 'uint8_t'typedef unsigned char  uint8_t;^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:49:28: error: storage class specified for parameter 'uint16_t'typedef unsigned short int uint16_t;^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:51:23: error: storage class specified for parameter 'uint32_t'typedef unsigned int  uint32_t;^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:57:1: error: expected declaration specifiers before '__extension__'__extension__^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:65:22: error: storage class specified for parameter 'int_least8_t'typedef signed char  int_least8_t;^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:66:20: error: storage class specified for parameter 'int_least16_t'typedef short int  int_least16_t;^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:67:15: error: storage class specified for parameter 'int_least32_t'typedef int   int_least32_t;^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:71:1: error: expected declaration specifiers before '__extension__'__extension__^
/tools/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/include/stdint.h:76:24: error: storage class specified for parameter 'uint_least8_t'
./common/log.h:27:3: error: storage class specified for parameter 'log_level_t'} log_level_t;^
./common/log.h:40:3: error: storage class specified for parameter 'log_attr_t'} log_attr_t;^
./common/log.h:43:15: error: expected declaration specifiers or '...' before 'log_attr_t'void log_init(log_attr_t *attr);^
mqtt/mqtt_client.c:23:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token{^
mqtt/mqtt_client.c:82:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token{^
mqtt/mqtt_client.c:91:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token{^
mqtt/mqtt_client.c:113:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token{^
mqtt/mqtt_client.c:216:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token{^
In file included from mqtt/mqtt_client.c:16:0:
mqtt/mqtt_client.h:25:11: error: old-style parameter declarations in prototyped function definitionMQTTAsync mqtt_init(const char* server_uri, const char *client_id, MQTTAsync_messageArrived* msg_arrive)^
mqtt/mqtt_client.c:248:1: error: expected '{' at end of input}^
mqtt/mqtt_client.c:248:1: warning: control reaches end of non-void function [-Wreturn-type]}

其中有一条是

mqtt/mqtt_client.h:25:11: error: old-style parameter declarations in prototyped function definition

2:原因

在头文件中添加函数说明的时候,结尾没有加分号导致的

3:解决

在缺失分号的地方添加分号

old-style parameter declarations in prototyped function definition相关推荐

  1. Matlab:成功解决Function definition are not permitted at the prompt or scripts

    Matlab:成功解决Function definition are not permitted at the prompt or scripts 目录 解决问题 解决方法 解决问题 Function ...

  2. warning C4183: ‘Cricle‘: member function definition looks like a ctor, but name does not match enclo

    报错:warning C4183: 'Cricle': member function definition looks like a ctor, but name does not match en ...

  3. This old-style function definition is not preceded by a prototype

    文章目录 Intro warning 及解决 截屏 知其然,却不知其所以然 Intro 在 Xcode 14 中随意写了几个C命令行程序,编译运行OK. 但是有以下两种报错: This old-sty ...

  4. error C2448: 'Unknown' : function-style initializer appears to be a function definition

    在学习c中遇到此问题: error C2448: '<Unknown>' : function-style initializer appears to be a function def ...

  5. SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside stri

    SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside stric ...

  6. 【C语言】解决 “error: function definition is not allowed here”

    目录 1.遇到问题 2.问题解决 1.遇到问题 error: function definition is not allowed here 错误:此处不允许函数定义. 2.问题解决 检查函数定义的范 ...

  7. cad 执行 autolisp 出现错误:错误: no function definition: VLAX-ENAME->VLA-OBJECT

    cad执行autolisp出现错误: 错误: no function definition: VLAX-ENAME->VLA-OBJECT 解决办法: 首先执行     (vl-load-com ...

  8. Autolisp no function definition

    问题表现: 源码运行正常,编译成vlx 或是fas运行提示函数没有定义. 问题实质: 首先排除语法问题,定义在别的vlx中的函数未导出或是未引用问题.然后回到vlx本身,内部相互调用也会出现问题请参照 ...

  9. 解决 Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at

    源地址:https://github.com/askmike/gekko/issues/1604 这个问题好像是由于nodejs版本过低导致的,更新nodejs版本就行. 依次输入以下指令 sudo ...

  10. 【嵌入式】使用Cross Toolchain构建交叉工具链

    Preface 前面编译linux内核的时候,用各种cross版本都不行啊,真是纠结,于是就想着自己也要会编译交叉工具的方法,然后各种尝试,各种问题啊,最后还是没解决(还有其它事情),步骤我都走熟了, ...

最新文章

  1. while循环中,break,continue,return的差别
  2. 32位系统 和 64位系统 C 程序中 为什么 指针的内存大小的不一样
  3. javascript——原型与原型链
  4. jmeter所有版本下载地址分享
  5. .NET中委托写法的演变(上):委托与匿名方法
  6. SAP Fiori应用的搜索问题
  7. 斗鱼上市首日低开平收 总市值37.3亿美元
  8. 马化腾评 ofo 溃败原因;京东到家否认裁员;王兴质押全部摩拜股权 | 极客头条...
  9. 渐变虚框及边框滚动的实现
  10. 24h的编程比赛总结
  11. CentOS7安装FTP服务器及默认21端口修改
  12. 全球及中国柔性石材行业研究及十四五规划分析报告
  13. 使用双显示器时其中一个屏幕出现重影的问题——缺少吸收磁环
  14. poi实现Excel文件写入 支持后缀XLSX格式
  15. 开源工作流BPM软件JFlow安装配置视频教程
  16. 年会活跃微信群小游戏有哪些?塔防小游戏经典玩法讲解
  17. Mac上抓住每一次灵感迸发的App
  18. 完美解决微信浏览器内长按识别个人收款码的案例分享
  19. Java中的死锁及其解决方案
  20. 黑白风格个人年终总结PPT模板

热门文章

  1. 小米、华为、一加、OPPO接连入场,电视的魅力在哪里?
  2. 一加和华为买哪个好 一加9用新特性赢得消费者口碑
  3. 跟着安全牛大表哥学渗透
  4. [我教你学]四步解决微软鼠标单击变双击问题
  5. ATTCK实战系列(二)琢磨篇
  6. Activity实战之装备购买小案例
  7. 探寻Linux 中国之路
  8. LC-3下汇编实现简易版四子棋的游戏
  9. 第六章 类与对象 类的包含
  10. java调用存储过程 sql server,Sql Server的存储过程与Java代码相连接调用(二)