Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
d171e18c
Commit
d171e18c
authored
Jan 22, 2019
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some cppcheck errors and warnings in config module and T Tracer
parent
974167b5
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
341 additions
and
159 deletions
+341
-159
common/config/config_cmdline.c
common/config/config_cmdline.c
+1
-1
common/config/config_load_configmodule.c
common/config/config_load_configmodule.c
+1
-1
common/utils/T/T.c
common/utils/T/T.c
+3
-3
common/utils/T/T.h
common/utils/T/T.h
+41
-40
common/utils/msc/msc.c
common/utils/msc/msc.c
+295
-114
No files found.
common/config/config_cmdline.c
View file @
d171e18c
...
@@ -171,7 +171,7 @@ int config_check_unknown_cmdlineopt(char *prefix) {
...
@@ -171,7 +171,7 @@ int config_check_unknown_cmdlineopt(char *prefix) {
if
(
strcmp
(
prefix
,
CONFIG_CHECKALLSECTIONS
)
==
0
)
if
(
strcmp
(
prefix
,
CONFIG_CHECKALLSECTIONS
)
==
0
)
finalcheck
=
1
;
finalcheck
=
1
;
else
if
(
strlen
(
prefix
)
>
0
)
{
else
if
(
strlen
(
prefix
)
>
0
)
{
sprintf
(
testprefix
,
"--%
s."
,
prefix
);
sprintf
(
testprefix
,
"--%
.*s."
,
CONFIG_MAXOPTLENGTH
-
1
,
prefix
);
}
}
}
}
...
...
common/config/config_load_configmodule.c
View file @
d171e18c
...
@@ -345,7 +345,7 @@ void free_configmodule(void) {
...
@@ -345,7 +345,7 @@ void free_configmodule(void) {
if
(
cfgptr
->
cfgmode
!=
NULL
)
free
(
cfgptr
->
cfgmode
);
if
(
cfgptr
->
cfgmode
!=
NULL
)
free
(
cfgptr
->
cfgmode
);
printf
(
"[CONFIG] free %
u
config parameter pointers
\n
"
,
cfgptr
->
num_cfgP
);
printf
(
"[CONFIG] free %
i
config parameter pointers
\n
"
,
cfgptr
->
num_cfgP
);
for
(
int
i
=
0
;
i
<
cfgptr
->
num_cfgP
;
i
++
)
{
for
(
int
i
=
0
;
i
<
cfgptr
->
num_cfgP
;
i
++
)
{
if
(
cfgptr
->
cfgP
[
i
]
!=
NULL
)
free
(
cfgptr
->
cfgP
[
i
]);
if
(
cfgptr
->
cfgP
[
i
]
!=
NULL
)
free
(
cfgptr
->
cfgP
[
i
]);
...
...
common/utils/T/T.c
View file @
d171e18c
...
@@ -202,9 +202,9 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork) {
...
@@ -202,9 +202,9 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork) {
}
}
void
T_Config_Init
(
void
)
{
void
T_Config_Init
(
void
)
{
int
T_port
;
/* by default we wait for the tracer */
int
T_port
=
TTRACER_DEFAULT_PORTNUM
;
/* by default we wait for the tracer */
int
T_nowait
;
/* default port to listen to to wait for the tracer */
int
T_nowait
=
0
;
/* default port to listen to to wait for the tracer */
int
T_dont_fork
;
/* default is to fork, see 'T_init' to understand */
int
T_dont_fork
=
0
;
/* default is to fork, see 'T_init' to understand */
paramdef_t
ttraceparams
[]
=
CMDLINE_TTRACEPARAMS_DESC
;
paramdef_t
ttraceparams
[]
=
CMDLINE_TTRACEPARAMS_DESC
;
/* for a cleaner config file, TTracer params should be defined in a
/* for a cleaner config file, TTracer params should be defined in a
* specific section...
* specific section...
...
...
common/utils/T/T.h
View file @
d171e18c
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include "T_defs.h"
#include "T_defs.h"
#ifdef T_SEND_TIME
#ifdef T_SEND_TIME
#include <time.h>
#include <time.h>
#endif
#endif
/* T message IDs */
/* T message IDs */
...
@@ -598,20 +598,21 @@ extern int *T_active;
...
@@ -598,20 +598,21 @@ extern int *T_active;
#define TTRACER_CONFIG_PREFIX "TTracer"
#define TTRACER_CONFIG_PREFIX "TTracer"
/*------------------------------------------------------------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------------------------------------------------------------
-------
*/
/* configuration parameters for TTRACE utility */
/* configuration parameters for TTRACE utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
#define TTRACER_DEFAULT_PORTNUM 2021
#define CMDLINE_TTRACEPARAMS_DESC { \
#define CMDLINE_TTRACEPARAMS_DESC { \
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:2021, TYPE_INT, 0},
\
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:TTRACER_DEFAULT_PORTNUM, TYPE_INT, 0},
\
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0},
\
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0},
\
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:0, TYPE_INT, 0},
\
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:0, TYPE_INT, 0},
\
{"T_stdout", CONFIG_HLP_STDOUT, PARAMFLAG_BOOL, iptr:&T_stdout, defintval:1, TYPE_INT, 0},
\
{"T_stdout", CONFIG_HLP_STDOUT, PARAMFLAG_BOOL, iptr:&T_stdout, defintval:1, TYPE_INT, 0},
\
}
}
/* log on stdout */
/* log on stdout */
void
T_init
(
int
remote_port
,
int
wait_for_tracer
,
int
dont_fork
);
void
T_init
(
int
remote_port
,
int
wait_for_tracer
,
int
dont_fork
);
void
T_Config_Init
(
void
);
void
T_Config_Init
(
void
);
#else
/* T_TRACER */
#else
/* T_TRACER */
...
...
common/utils/msc/msc.c
View file @
d171e18c
This diff is collapsed.
Click to expand it.
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