Zach Welch <zw@superlucidity.net> fix unused return value warnings (2 of 4)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1486 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
6f7d3c9d5b
commit
24243b2b7a
|
@ -133,7 +133,9 @@ static char buf[2048];
|
||||||
buf[sizeof(buf)-1] = 0;
|
buf[sizeof(buf)-1] = 0;
|
||||||
#else
|
#else
|
||||||
char *buf;
|
char *buf;
|
||||||
vasprintf( &buf, fmt, ap );
|
int result;
|
||||||
|
result = vasprintf( &buf, fmt, ap );
|
||||||
|
if (result < 0) exit(-1);
|
||||||
#endif
|
#endif
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
@ -8953,7 +8955,7 @@ int Jim_EvalFile(Jim_Interp *interp, const char *filename)
|
||||||
const int cwd_len=2048;
|
const int cwd_len=2048;
|
||||||
char *cwd=malloc(cwd_len);
|
char *cwd=malloc(cwd_len);
|
||||||
Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
|
Jim_SetResult(interp, Jim_NewEmptyStringObj(interp));
|
||||||
getcwd( cwd, cwd_len );
|
if (!getcwd( cwd, cwd_len )) strcpy(cwd, "unknown");
|
||||||
Jim_AppendStrings(interp, Jim_GetResult(interp),
|
Jim_AppendStrings(interp, Jim_GetResult(interp),
|
||||||
"Error loading script \"", filename, "\"",
|
"Error loading script \"", filename, "\"",
|
||||||
" cwd: ", cwd,
|
" cwd: ", cwd,
|
||||||
|
|
Loading…
Reference in New Issue