* Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
*/
+#include <glib.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
#define BT_COMP_LOG_SELF_COMP (ctx->self_comp)
#define BT_COMP_LOG_SELF_COMP_CLASS (ctx->self_comp_class)
-#define BT_LOG_OUTPUT_LEVEL (ctx->log_level)
+#define BT_LOG_OUTPUT_LEVEL ((enum bt_log_level) ctx->log_level)
#define BT_LOG_TAG "PLUGIN/CTF/META/RESOLVE"
+#include "logging.hpp"
#include "logging/comp-logging.h"
-#include <babeltrace2/babeltrace.h>
-#include "common/macros.h"
#include "common/assert.h"
#include "common/common.h"
-#include <glib.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <glib.h>
#include "ctf-meta-visitors.hpp"
-#include "logging.hpp"
using field_class_stack_t = GPtrArray;
/*
* Destroys a path token.
*/
-static void ptokens_destroy_func(gpointer ptoken, gpointer data)
+static void ptokens_destroy_func(gpointer ptoken, gpointer)
{
g_string_free((GString *) ptoken, TRUE);
}
if (BT_LOG_ON_TRACE) {
GString *field_path1_pretty = ctf_field_path_string(field_path1);
GString *field_path2_pretty = ctf_field_path_string(field_path2);
- const char *field_path1_pretty_str = field_path1_pretty ? field_path1_pretty->str : NULL;
- const char *field_path2_pretty_str = field_path2_pretty ? field_path2_pretty->str : NULL;
+ const char *field_path1_pretty_str =
+ field_path1_pretty ? field_path1_pretty->str : "(null)";
+ const char *field_path2_pretty_str =
+ field_path2_pretty ? field_path2_pretty->str : "(null)";
BT_COMP_LOGD("Finding lowest common ancestor (LCA) between two field paths: "
"field-path-1=\"%s\", field-path-2=\"%s\"",