X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevent-rule%2Flog4j-logging.cpp;h=b7386c0ba36f99743055efff6c0ff5a8b04d954e;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=25f2c4c0e7ee5d5344bc228a018262365f0af3e6;hpb=a6bc4ca9d659caf016ef932fcd944029737ac57c;p=lttng-tools.git diff --git a/src/common/event-rule/log4j-logging.cpp b/src/common/event-rule/log4j-logging.cpp index 25f2c4c0e..b7386c0ba 100644 --- a/src/common/event-rule/log4j-logging.cpp +++ b/src/common/event-rule/log4j-logging.cpp @@ -5,19 +5,19 @@ * */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -376,7 +376,7 @@ lttng_event_rule_log4j_logging_get_internal_filter_bytecode( static enum lttng_event_rule_generate_exclusions_status lttng_event_rule_log4j_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_log4j_logging_generate_lttng_event( log4j_logging = container_of( rule, const struct lttng_event_rule_log4j_logging, parent); - local_event = (lttng_event *) zmalloc(sizeof(*local_event)); + local_event = zmalloc(); if (!local_event) { goto error; } @@ -560,7 +560,7 @@ struct lttng_event_rule *lttng_event_rule_log4j_logging_create(void) struct lttng_event_rule_log4j_logging *tp_rule; enum lttng_event_rule_status status; - tp_rule = (lttng_event_rule_log4j_logging *) zmalloc(sizeof(struct lttng_event_rule_log4j_logging)); + tp_rule = zmalloc(); 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 both LOG4J custom log level are possible and can