d314361768 发表于 2016-5-13 15:24:54

xc8 警告 initial value

定义静态浮点数数组时的警告
const floatYLList = {
    {0.0,31.0},
    {0.1, 194.0},………………   

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


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

abutter 发表于 2016-5-13 15:37:49

本帖最后由 abutter 于 2016-5-13 15:41 编辑

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

d314361768 发表于 2016-5-13 21:12:00

const floatYLList = {
    {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

d314361768 发表于 2016-5-13 23:17:42

似乎网上类似的很少

tdh03z 发表于 2016-5-14 12:55:47

警告而已,我一般不处理

d314361768 发表于 2016-5-14 18:05:51

调试时特意断点看了看,静态数组的数据是正确的。但看着一堆警告,心里总是不舒服。

sbusr 发表于 2016-5-14 20:04:07

楼主是不是把变量定义到了.h文件里了?

d314361768 发表于 2016-5-15 20:03:03

是的 静态数组在.h文件里

d314361768 发表于 2016-5-15 20:06:01

{:handshake:} 放到.c文件里没警告了。
页: [1]
查看完整版本: xc8 警告 initial value