From: Simon Marchi Date: Wed, 28 Aug 2019 20:41:54 +0000 (-0400) Subject: cli: remove unused path variable in set_stream_intersections X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=b6bbfe5adfb39444433b2628b9264a69487e8660;p=babeltrace.git cli: remove unused path variable in set_stream_intersections The `path` variable is used in the error message, but never set, so it will always appear as "(unknown)". In the future, it would be nice if the error message gave more info to the user. But right now, it is pointless to keep `path` there, so remove it. Change-Id: If55d8246dde8cffe1b584477643f105acaaa4792 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/1992 Tested-by: jenkins Reviewed-by: Francis Deslauriers --- diff --git a/src/cli/babeltrace2.c b/src/cli/babeltrace2.c index de0b6c2b..0b6f2341 100644 --- a/src/cli/babeltrace2.c +++ b/src/cli/babeltrace2.c @@ -1927,7 +1927,6 @@ int set_stream_intersections(struct cmd_run_ctx *ctx, int ret = 0; uint64_t trace_idx; int64_t trace_count; - const char *path = NULL; const bt_value *query_result = NULL; const bt_value *trace_info = NULL; const bt_value *intersection_range = NULL; @@ -2098,8 +2097,7 @@ int set_stream_intersections(struct cmd_run_ctx *ctx, error: BT_CLI_LOGE_APPEND_CAUSE( - "Cannot determine stream intersection of trace: path=\"%s\"", - path ? path : "(unknown)"); + "Cannot determine stream intersection of trace."); end: bt_value_put_ref(query_result);