浏览代码

preprocessor: Initialize a potentially uninitialized variable.

My current reading of the relevant static functions suggests that last
is never used without being uninitialized, (we only use it if the
expansion function returned non-NULL and the expansion functions
always set it before returning non-NULL).

Apparently gcc isn't coming to the same conclusion. Initializing this
to NULL nicely quites gcc and will guarantee a nice, early segfault if
my anaylsis turns out to be wrong.
tags/mesa-7.9-rc1
Carl Worth 15 年前
父节点
当前提交
c42e64099b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      glcpp/glcpp-parse.y

+ 1
- 1
glcpp/glcpp-parse.y 查看文件

@@ -1312,7 +1312,7 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
token_list_t *list)
{
token_node_t *node_prev;
token_node_t *node, *last;
token_node_t *node, *last = NULL;
token_list_t *expansion;

if (list == NULL)

正在加载...
取消
保存