fix gcc warnings about not checking asprintf return

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1735 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent 9d1b143a41
commit e3125c5a18

@ -37,6 +37,8 @@
* include/urjtag/bfin.h: Tweak header ifdef protection.
* src/cmd/cmd_bfin.c: Fix gcc warnings about unused asprintf() return.
2010-01-24 Arnim Laeuger <arniml>
* src/tap/usbconn/libftdi.c, src/tap/usbconn/libftd2xx.c:

@ -387,11 +387,16 @@ cmd_bfin_run (urj_chain_t *chain, char *params[])
int ret;
/* TODO Pass -mcpu= to gas. */
asprintf (&tmp_buf,
"bfin-%3$s-as --version >/dev/null 2>&1 || exit $?;"
"echo '%1$s' | bfin-%3$s-as - -o \"%2$s\""
" && bfin-%3$s-objcopy -O binary \"%2$s\"",
insns_string, tmpfile, tuples[t]);
ret = asprintf (&tmp_buf,
"bfin-%3$s-as --version >/dev/null 2>&1 || exit $?;"
"echo '%1$s' | bfin-%3$s-as - -o \"%2$s\""
" && bfin-%3$s-objcopy -O binary \"%2$s\"",
insns_string, tmpfile, tuples[t]);
if (ret == -1)
{
urj_error_set (URJ_ERROR_OUT_OF_MEMORY, _("asprintf() failed"));
goto execute_cleanup;
}
ret = system (tmp_buf);
free (tmp_buf);
if (WIFEXITED(ret))

Loading…
Cancel
Save