We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rule.c:190:17: error: ‘rtail may be used uninitialized in this function [-Werror=maybe-uninitialized] rtail->next = a; ~~~~~~~~~~~~^~~
从代码里看 scws/libscws/rule.c@scws_rule_new里 rule_attr_t a, rtail; // 此处rtail未做初始化 ... /* append to the chain list */ if (r->attr == NULL) r->attr = rtail = a; else { rtail->next = a; // 此处使用了未初始化的变量 rtail = a; } 建议改成: rule_attr_t a, rtail = NULL; ... else { if (rtail) rtail->next = a; rtail = a; }
The text was updated successfully, but these errors were encountered:
暂时通过增加编译参数-no-undefined绕过
Sorry, something went wrong.
No branches or pull requests
rule.c:190:17: error: ‘rtail may be used uninitialized in this function [-Werror=maybe-uninitialized]
rtail->next = a;
~~~~~~~~~~~~^~~
从代码里看
scws/libscws/rule.c@scws_rule_new里
rule_attr_t a, rtail; // 此处rtail未做初始化
...
/* append to the chain list */
if (r->attr == NULL)
r->attr = rtail = a;
else
{
rtail->next = a; // 此处使用了未初始化的变量
rtail = a;
}
建议改成:
rule_attr_t a, rtail = NULL;
...
else
{
if (rtail)
rtail->next = a;
rtail = a;
}
The text was updated successfully, but these errors were encountered: