搜索
bottom↓
回复: 8

xc8 警告 initial value

[复制链接]

出0入0汤圆

发表于 2016-5-13 15:24:54 | 显示全部楼层 |阅读模式
定义静态浮点数数组时的警告
const float  YLList[17][2] = {
    {0.0,  31.0},
    {0.1, 194.0},………………   

user.h:71: warning: (1478) initial value for "_YLList" differs to that in user.h:71


请高人帮忙解答下,网上没搜到答案。

出0入12汤圆

发表于 2016-5-13 15:37:49 | 显示全部楼层
本帖最后由 abutter 于 2016-5-13 15:41 编辑

你能不能提供更多的信息?

出0入0汤圆

 楼主| 发表于 2016-5-13 21:12:00 | 显示全部楼层
const float  YLList[17][2] = {
    {0.0,  31.0},
    {0.1, 194.0},
    {0.2, 414.0},
    {0.3, 629.0},
    {0.4, 845.0},

:: warning: (1459) peripheral library support is missing for the 18F67K22
:: warning: (1273) Omniscient Code Generation not available in Free mode
Non line specific message:: advisory: (1492) using updated 32-bit floating-point libraries; improved accuracy might increase code size
user.h:70: warning: (1478) initial value for "_YLList" differs to that in user.h:70
user.h:71: warning: (1478) initial value for "_YLList" differs to that in user.h:71
user.h:72: warning: (1478) initial value for "_YLList" differs to that in user.h:72
user.h:73: warning: (1478) initial value for "_YLList" differs to that in user.h:73
user.h:74: warning: (1478) initial value for "_YLList" differs to that in user.h:74
user.h:75: warning: (1478) initial value for "_YLList" differs to that in user.h:75
user.h:76: warning: (1478) initial value for "_YLList" differs to that in user.h:76
user.h:77: warning: (1478) initial value for "_YLList" differs to that in user.h:77
user.h:78: warning: (1478) initial value for "_YLList" differs to that in user.h:78
user.h:79: warning: (1478) initial value for "_YLList" differs to that in user.h:79
user.h:80: warning: (1478) initial value for "_YLList" differs to that in user.h:80
user.h:81: warning: (1478) initial value for "_YLList" differs to that in user.h:81
user.h:82: warning: (1478) initial value for "_YLList" differs to that in user.h:82
user.h:83: warning: (1478) initial value for "_YLList" differs to that in user.h:83
user.h:84: warning: (1478) initial value for "_YLList" differs to that in user.h:84
user.h:85: warning: (1478) initial value for "_YLList" differs to that in user.h:85
user.h:86: warning: (1478) initial value for "_YLList" differs to that in user.h:86
:: warning: (1311) missing configuration setting for config word 0x30000C; using default
:: warning: (1311) missing configuration setting for config word 0x30000D; using default

出0入0汤圆

 楼主| 发表于 2016-5-13 23:17:42 | 显示全部楼层
似乎网上类似的很少

出0入0汤圆

发表于 2016-5-14 12:55:47 来自手机 | 显示全部楼层
警告而已,我一般不处理

出0入0汤圆

 楼主| 发表于 2016-5-14 18:05:51 | 显示全部楼层
调试时特意断点看了看,静态数组的数据是正确的。但看着一堆警告,心里总是不舒服。

出0入0汤圆

发表于 2016-5-14 20:04:07 来自手机 | 显示全部楼层
楼主是不是把变量定义到了.h文件里了?

出0入0汤圆

 楼主| 发表于 2016-5-15 20:03:03 | 显示全部楼层
是的 静态数组在.h文件里

出0入0汤圆

 楼主| 发表于 2016-5-15 20:06:01 | 显示全部楼层
放到.c文件里没警告了。
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-3 05:37

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表