fix coverity issue Missing varargs init or cleanup

This commit is contained in:
Fabrizio Fabbri 2017-05-17 23:20:10 +02:00
parent 6c8449b147
commit a74094de9a
No known key found for this signature in database
GPG key ID: 8276EDF3D10E6C35
10 changed files with 27 additions and 5 deletions

View file

@ -439,6 +439,7 @@ mp_process_preset(cl_narg narg, cl_object process, cl_object function, ...)
assert_type_process(process);
process->process.function = function;
process->process.args = cl_grab_rest_args(args);
ecl_va_end(args);
@(return process);
}
@ -644,6 +645,7 @@ cl_object
mp_process_run_function(cl_narg narg, cl_object name, cl_object function, ...)
{
cl_object process;
cl_object rest;
ecl_va_list args;
ecl_va_start(args, function, narg, 2);
if (narg < 2)
@ -653,8 +655,10 @@ mp_process_run_function(cl_narg narg, cl_object name, cl_object function, ...)
} else {
process = mp_make_process(2, @':name', name);
}
rest = cl_grab_rest_args(args);
ecl_va_end(args);
cl_apply(4, @'mp::process-preset', process, function,
cl_grab_rest_args(args));
rest);
return mp_process_enable(process);
}
@ -672,6 +676,7 @@ mp_process_run_function_wait(cl_narg narg, ...)
cl_sleep(wait);
}
}
ecl_va_end(args);
@(return process);
}

View file

@ -386,5 +386,6 @@ print_lock(char *prefix, cl_object l, ...)
fflush(stdout);
ecl_giveup_spinlock(&lock);
}
va_end(args);
}
/*#define print_lock(a,b,c) (void)0*/