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