Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4a3b52b0
authored
Jan 19, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base_c: removed cppcheck warnings
parent
9c5df58a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
base_c/src/log.c
+4
-2
No files found.
base_c/src/log.c
View file @
4a3b52b0
...
@@ -65,8 +65,6 @@ static void embb_log_write_internal(
...
@@ -65,8 +65,6 @@ static void embb_log_write_internal(
char
const
*
message
,
char
const
*
message
,
va_list
argp
)
{
va_list
argp
)
{
if
(
log_level
<=
embb_log_global_log_level
)
{
if
(
log_level
<=
embb_log_global_log_level
)
{
char
msg_buffer
[
400
];
char
buffer
[
500
];
char
*
log_level_str
=
" "
;
char
*
log_level_str
=
" "
;
char
const
*
channel_str
=
channel
;
char
const
*
channel_str
=
channel
;
void
*
log_context
=
embb_log_global_log_context
;
void
*
log_context
=
embb_log_global_log_context
;
...
@@ -94,11 +92,15 @@ static void embb_log_write_internal(
...
@@ -94,11 +92,15 @@ static void embb_log_write_internal(
break
;
break
;
}
}
#if defined(EMBB_COMPILER_MSVC)
#if defined(EMBB_COMPILER_MSVC)
char
msg_buffer
[
400
];
char
buffer
[
500
];
vsprintf_s
(
msg_buffer
,
sizeof
(
msg_buffer
),
message
,
argp
);
vsprintf_s
(
msg_buffer
,
sizeof
(
msg_buffer
),
message
,
argp
);
sprintf_s
(
buffer
,
sizeof
(
buffer
),
"[%s] - [%s] %s"
,
sprintf_s
(
buffer
,
sizeof
(
buffer
),
"[%s] - [%s] %s"
,
channel_str
,
log_level_str
,
msg_buffer
);
channel_str
,
log_level_str
,
msg_buffer
);
embb_log_global_log_function
(
log_context
,
buffer
);
embb_log_global_log_function
(
log_context
,
buffer
);
#elif defined(EMBB_COMPILER_GNUC)
#elif defined(EMBB_COMPILER_GNUC)
char
msg_buffer
[
400
];
char
buffer
[
500
];
vsnprintf
(
msg_buffer
,
sizeof
(
msg_buffer
),
message
,
argp
);
vsnprintf
(
msg_buffer
,
sizeof
(
msg_buffer
),
message
,
argp
);
snprintf
(
buffer
,
sizeof
(
buffer
),
"[%s] - [%s] %s"
,
snprintf
(
buffer
,
sizeof
(
buffer
),
"[%s] - [%s] %s"
,
channel_str
,
log_level_str
,
msg_buffer
);
channel_str
,
log_level_str
,
msg_buffer
);
...
...
Write
Preview
Markdown
is supported
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