mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-13 23:36:03 +00:00
Clang found an uninitialized pointer.
This commit is contained in:
parent
c53aec71c3
commit
706e4e9758
2
extree.c
2
extree.c
@ -718,7 +718,7 @@ EX_TREE *evaluate(
|
||||
EX_TREE *new_ex_tree(
|
||||
void)
|
||||
{
|
||||
EX_TREE *tr = memcheck(malloc(sizeof(EX_TREE)));
|
||||
EX_TREE *tr = memcheck(calloc(1, sizeof(EX_TREE)));
|
||||
|
||||
return tr;
|
||||
}
|
||||
|
||||
5
parse.c
5
parse.c
@ -951,7 +951,7 @@ EX_TREE *parse_unary(
|
||||
char bound = tolower((unsigned char)cp[2]);
|
||||
char *cp2 = skipwhite(cp + 3);
|
||||
int islocal = 0;
|
||||
char *endcp;
|
||||
char *endcp = NULL;
|
||||
char *psectname = get_symbol(cp2, &endcp, &islocal);
|
||||
SYMBOL *sectsym = psectname ? lookup_sym(psectname, §ion_st) : NULL;
|
||||
|
||||
@ -974,6 +974,9 @@ EX_TREE *parse_unary(
|
||||
}
|
||||
} else {
|
||||
/* report(stack->top, "psect name %s not found\n", psectname); */
|
||||
if (!endcp) {
|
||||
endcp = cp;
|
||||
}
|
||||
if (pass == 0) {
|
||||
/*
|
||||
* During the first pass it is expected that the psect is not
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user