projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng: add-context: silence coverity warning
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
add_context.cpp
diff --git
a/src/bin/lttng/commands/add_context.cpp
b/src/bin/lttng/commands/add_context.cpp
index d078471d3d784ca88e041bddf96b5c2acc95b8c3..076fa83a44a69b717f3fad2f719bcec8861f0559 100644
(file)
--- a/
src/bin/lttng/commands/add_context.cpp
+++ b/
src/bin/lttng/commands/add_context.cpp
@@
-51,9
+51,10
@@
static struct lttng_handle *handle;
static struct mi_writer *writer;
/*
static struct mi_writer *writer;
/*
- * Taken from the LTTng ABI
+ * Taken from the LTTng ABI
except for "UNKNOWN".
*/
enum context_type {
*/
enum context_type {
+ CONTEXT_UNKNOWN = -1,
CONTEXT_PID = 0,
CONTEXT_PERF_COUNTER = 1, /* Backward compat. */
CONTEXT_PROCNAME = 2,
CONTEXT_PID = 0,
CONTEXT_PERF_COUNTER = 1, /* Backward compat. */
CONTEXT_PROCNAME = 2,
@@
-220,7
+221,7
@@
static
const struct ctx_opts {
/* Needed for end-of-list item. */
ctx_opts()
const struct ctx_opts {
/* Needed for end-of-list item. */
ctx_opts()
- :
symbol(nullptr
)
+ :
ctx_opts(nullptr, CONTEXT_UNKNOWN
)
{}
ctx_opts(const char *symbol_, context_type ctx_type_, bool hide_help_ = false)
{}
ctx_opts(const char *symbol_, context_type ctx_type_, bool hide_help_ = false)
This page took
0.023694 seconds
and
4
git commands to generate.