Where the returned line length from Buf_GetAll is not used just pass
a NULL to the function. Delete the now unused local variables. Submitted by: Max Okumoto <okumoto@ucsd.edu>
This commit is contained in:
parent
44af3ae976
commit
43632a424a
@ -253,11 +253,10 @@ ForExec(void *namep, void *argp)
|
||||
{
|
||||
char *name = namep;
|
||||
For *arg = argp;
|
||||
size_t len;
|
||||
|
||||
Var_Set(arg->var, name, VAR_GLOBAL);
|
||||
DEBUGF(FOR, ("--- %s = %s\n", arg->var, name));
|
||||
Parse_FromString(Var_Subst(arg->var, (char *)Buf_GetAll(arg->buf, &len),
|
||||
Parse_FromString(Var_Subst(arg->var, (char *)Buf_GetAll(arg->buf, NULL),
|
||||
VAR_GLOBAL, FALSE), arg->lineno);
|
||||
Var_Delete(arg->var, VAR_GLOBAL);
|
||||
|
||||
|
@ -2012,7 +2012,6 @@ ParseSkipLine(int skip, int keep_newline)
|
||||
{
|
||||
char *line;
|
||||
int c, lastc;
|
||||
size_t lineLength = 0;
|
||||
Buffer *buf;
|
||||
|
||||
buf = Buf_Init(MAKE_BSIZE);
|
||||
@ -2056,7 +2055,7 @@ ParseSkipLine(int skip, int keep_newline)
|
||||
|
||||
curFile.lineno++;
|
||||
Buf_AddByte(buf, (Byte)'\0');
|
||||
line = (char *)Buf_GetAll(buf, &lineLength);
|
||||
line = (char *)Buf_GetAll(buf, NULL);
|
||||
} while (skip == 1 && line[0] != '.');
|
||||
|
||||
Buf_Destroy(buf, FALSE);
|
||||
@ -2094,7 +2093,6 @@ ParseReadLine(void)
|
||||
* shell command */
|
||||
char *line; /* Result */
|
||||
char *ep; /* to strip trailing blanks */
|
||||
size_t lineLength; /* Length of result */
|
||||
int lineno; /* Saved line # */
|
||||
|
||||
semiNL = FALSE;
|
||||
@ -2253,7 +2251,7 @@ ParseReadLine(void)
|
||||
Buf_AddByte(buf, (Byte)lastc);
|
||||
}
|
||||
Buf_AddByte(buf, (Byte)'\0');
|
||||
line = (char *)Buf_GetAll(buf, &lineLength);
|
||||
line = (char *)Buf_GetAll(buf, NULL);
|
||||
Buf_Destroy(buf, FALSE);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user