You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The macros failure_return, failure_goto will never return due to the construction of the function failure.
The macros fatal_return, fatal_goto will never return due to the construction of the function fatal,
This could result in an unintended removal of an lrz file if keep broken files is not set.
Also, there is residual library cruft in these functions and the control structure.
Throughout the program there is an inconsistent use of failure and fatal all of which will never return anyway. A simplified and standardized error handling method is required.
control->log_cb and control->library_mode have no meaning.
static inline void failure(const rzip_control *control, unsigned int line, const char *file, const char *func, const char *format, ...)
{
va_list ap;
va_start(ap, format);
if (!control->log_cb)
vfprintf(stderr, format, ap);
else
control->log_cb(control->log_data, 0, line, file, func, format, ap);
va_end(ap);
if (!control->library_mode)
fatal_exit((rzip_control*)control);
}
static inline void fatal(const rzip_control *control, unsigned int line, const char *file, const char *func, const char *format, ...)
{
va_list ap;
va_start(ap, format);
if (!control->log_cb) {
vfprintf(stderr, format, ap);
perror(NULL);
} else
control->log_cb(control->log_data, 0, line, file, func, format, ap);
va_end(ap);
if (!control->library_mode)
fatal_exit((rzip_control*)control);
}
The text was updated successfully, but these errors were encountered:
The macros
failure_return
,failure_goto
will never return due to the construction of the functionfailure
.The macros
fatal_return
,fatal_goto
will never return due to the construction of the functionfatal
,This could result in an unintended removal of an lrz file if keep broken files is not set.
Also, there is residual library cruft in these functions and the control structure.
Throughout the program there is an inconsistent use of
failure
andfatal
all of which will never return anyway. A simplified and standardized error handling method is required.control->log_cb
andcontrol->library_mode
have no meaning.The text was updated successfully, but these errors were encountered: