Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
blaar
blibs
blc_core
Commits
5133c29c
Commit
5133c29c
authored
May 15, 2017
by
Arnaud Blanchard
Browse files
Remove some excessive return lines in errors functions
parent
851322d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/blc_array.cpp
View file @
5133c29c
...
...
@@ -37,7 +37,6 @@ blc_dim *vcreate_blc_dims(size_t *size, uint32_t type, int dims_nb, int length,
dim
->
length
=
length
;
length
=
va_arg
(
arguments
,
int
);
}
return
dims
;
}
...
...
src/blc_tools.cpp
View file @
5133c29c
...
...
@@ -60,7 +60,7 @@ void print_warning(const char *name_of_file, const char* name_of_function, int n
va_start
(
arguments
,
message
);
color_eprintf
(
BLC_YELLOW
,
"
\n
%s: %s
\t
%s
\t
%i :
\n
Warning: "
,
blc_program_name
,
name_of_file
,
name_of_function
,
numero_of_line
);
color_veprintf
(
BLC_YELLOW
,
message
,
arguments
);
fprintf
(
stderr
,
"
\n
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
fflush
(
stderr
);
va_end
(
arguments
);
}
...
...
@@ -72,7 +72,7 @@ void print_system_error(const char *name_of_file, const char* name_of_function,
va_start
(
arguments
,
message
);
color_eprintf
(
BLC_BRIGHT_RED
,
"
\n
%s: %s
\t
%s
\t
%i :
\n
System error: %s
\n
"
,
blc_program_name
,
name_of_file
,
name_of_function
,
numero_of_line
,
strerror
(
errno
));
color_veprintf
(
BLC_BRIGHT_RED
,
message
,
arguments
);
fprintf
(
stderr
,
"
\n
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
fflush
(
stderr
);
va_end
(
arguments
);
}
...
...
@@ -82,10 +82,10 @@ void fatal_error(const char *name_of_file, const char* name_of_function, int num
{
va_list
arguments
;
va_start
(
arguments
,
message
);
color_eprintf
(
BLC_BRIGHT_RED
,
"
\n
%s: %s
\t
%s
\t
%i :
\n
Error: "
,
blc_program_name
,
name_of_file
,
name_of_function
,
numero_of_line
);
color_eprintf
(
BLC_BRIGHT_RED
,
"%s: %s
\t
%s
\t
%i :
\n
Error: "
,
blc_program_name
,
name_of_file
,
name_of_function
,
numero_of_line
);
color_veprintf
(
BLC_BRIGHT_RED
,
message
,
arguments
);
va_end
(
arguments
);
fprintf
(
stderr
,
"
\n
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
fflush
(
stderr
);
raise
(
SIGABRT
);
exit
(
EXIT_FAILURE
);
...
...
@@ -115,7 +115,7 @@ void fatal_command_system_error(const char *name_of_file, const char* name_of_fu
color_eprintf
(
BLC_BRIGHT_RED
,
"System error: %s
\n
"
,
strerror
(
errno
));
color_veprintf
(
BLC_BRIGHT_RED
,
message
,
arguments
);
va_end
(
arguments
);
fprintf
(
stderr
,
"
\n
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
fflush
(
stderr
);
raise
(
SIGABRT
);
exit
(
EXIT_FAILURE
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment