Reacted on warnings of -Wunused-but-set-variable
This commit is contained in:
parent
842b62d111
commit
2d568c1dbb
@ -247,9 +247,8 @@ void iso_msg_debug(int imgid, const char *fmt, ...)
|
||||
{
|
||||
char *msg = NULL;
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
LIBISO_ALLOC_MEM(msg, char, MAX_MSG_LEN);
|
||||
LIBISO_ALLOC_MEM_VOID(msg, char, MAX_MSG_LEN);
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(msg, MAX_MSG_LEN, fmt, ap);
|
||||
va_end(ap);
|
||||
|
@ -547,6 +547,12 @@ void *iso_alloc_mem(size_t size, size_t count, int flag);
|
||||
ret= ISO_OUT_OF_MEM; goto ex; \
|
||||
} }
|
||||
|
||||
#define LIBISO_ALLOC_MEM_VOID(pt, typ, count) { \
|
||||
pt= (typ *) iso_alloc_mem(sizeof(typ), (size_t) (count), 0); \
|
||||
if(pt == NULL) { \
|
||||
goto ex; \
|
||||
} }
|
||||
|
||||
#define LIBISO_FREE_MEM(pt) { \
|
||||
if(pt != NULL) \
|
||||
free((char *) pt); \
|
||||
|
Loading…
Reference in New Issue
Block a user