sessiond: Split ust_registry_session into per-type classes
[lttng-tools.git] / src / common / event-rule / python-logging.cpp
index 1ccd495cdf6f909b191e6d4c7e573717ecc8b18d..25e967702436e2afc34708a067a32b1ea7ffccd8 100644 (file)
@@ -5,19 +5,19 @@
  *
  */
 
-#include <common/credentials.h>
-#include <common/error.h>
-#include <common/hashtable/hashtable.h>
-#include <common/hashtable/utils.h>
-#include <common/macros.h>
-#include <common/mi-lttng.h>
-#include <common/optional.h>
-#include <common/payload-view.h>
-#include <common/payload.h>
-#include <common/runas.h>
-#include <common/string-utils/string-utils.h>
-#include <lttng/event-rule/event-rule-internal.h>
-#include <lttng/event-rule/python-logging-internal.h>
+#include <common/credentials.hpp>
+#include <common/error.hpp>
+#include <common/hashtable/hashtable.hpp>
+#include <common/hashtable/utils.hpp>
+#include <common/macros.hpp>
+#include <common/mi-lttng.hpp>
+#include <common/optional.hpp>
+#include <common/payload-view.hpp>
+#include <common/payload.hpp>
+#include <common/runas.hpp>
+#include <common/string-utils/string-utils.hpp>
+#include <lttng/event-rule/event-rule-internal.hpp>
+#include <lttng/event-rule/python-logging-internal.hpp>
 #include <lttng/event.h>
 #include <lttng/log-level-rule.h>
 
@@ -376,7 +376,7 @@ lttng_event_rule_python_logging_get_internal_filter_bytecode(
 
 static enum lttng_event_rule_generate_exclusions_status
 lttng_event_rule_python_logging_generate_exclusions(
-               const struct lttng_event_rule *rule,
+               const struct lttng_event_rule *rule __attribute__((unused)),
                struct lttng_event_exclusion **_exclusions)
 {
        /* Unsupported. */
@@ -421,7 +421,7 @@ static struct lttng_event *lttng_event_rule_python_logging_generate_lttng_event(
        python_logging = container_of(
                        rule, const struct lttng_event_rule_python_logging, parent);
 
-       local_event = (lttng_event *) zmalloc(sizeof(*local_event));
+       local_event = zmalloc<lttng_event>();
        if (!local_event) {
                goto error;
        }
@@ -560,7 +560,7 @@ struct lttng_event_rule *lttng_event_rule_python_logging_create(void)
        struct lttng_event_rule_python_logging *tp_rule;
        enum lttng_event_rule_status status;
 
-       tp_rule = (lttng_event_rule_python_logging *) zmalloc(sizeof(struct lttng_event_rule_python_logging));
+       tp_rule = zmalloc<lttng_event_rule_python_logging>();
        if (!tp_rule) {
                goto end;
        }
@@ -849,7 +849,8 @@ end:
        return status;
 }
 
-static bool log_level_rule_valid(const struct lttng_log_level_rule *rule)
+static bool log_level_rule_valid(
+               const struct lttng_log_level_rule *rule __attribute__((unused)))
 {
        /*
         * For python, custom log level are possible, it is not clear if
This page took 0.024694 seconds and 4 git commands to generate.