Sort includes in C++ files
[babeltrace.git] / src / plugins / ctf / common / metadata / ctf-meta-resolve.cpp
index 7042ec3a298a05e937f07aa74434c1e640381dc6..f498c50707509b9c18cace001505d4890ba60d3d 100644 (file)
@@ -5,27 +5,28 @@
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdint.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_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 "common/macros.h"
 
 #include "ctf-meta-visitors.hpp"
-#include "logging.hpp"
 
 using field_class_stack_t = GPtrArray;
 
@@ -278,7 +279,7 @@ end:
 /*
  * 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);
 }
@@ -728,8 +729,10 @@ static int64_t get_field_paths_lca_index(struct ctf_field_path *field_path1,
     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\"",
This page took 0.027833 seconds and 4 git commands to generate.