运行时生成和分析工具时,我收到警告Value stored to '' during initialisation is never read
。初始化期间存储为“'的值永远不会读取
它告诉在stRs232Timer* pTimer = malloc(sizeof(stRs232Timer));
也是我得到同样的警告为dwDelay=1000
在函数的某些部分。 这是宣布为unsigned long int dwDelay = 0;
为什么这样呢?
运行时生成和分析工具时,我收到警告Value stored to '' during initialisation is never read
。初始化期间存储为“'的值永远不会读取
它告诉在stRs232Timer* pTimer = malloc(sizeof(stRs232Timer));
也是我得到同样的警告为dwDelay=1000
在函数的某些部分。 这是宣布为unsigned long int dwDelay = 0;
为什么这样呢?
它告诉你,你永远不会使用pTimer
。
编辑 为了澄清,它实际上告诉你,你永远不会使用特定的pTimer值。如果您分配它并在使用之前重新分配,您将收到消息。例如
stRs232Timer* pTimer = malloc(sizeof(stRs232Timer));
// Lots of code not using pTimer.
pTimer = someFunction();
会发出警告。
什么告诉你分析仪?请澄清你的问题 – nacho4d 2011-06-09 06:45:19