Skip to content

Commit

Permalink
Fixed code linting issues due to updated build-base image
Browse files Browse the repository at this point in the history
In the new build-base image, a newer clang version with an updated
set of checks is detecting issues. The issues
- bugprone-multi-level-implicit-pointerconversion
- cppcoreguidelines-macro-to-enum
have been added to the ignore list while others have been fixed.

Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Aug 9, 2024
1 parent a0afdc7 commit 6e23e2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Checks: >
-modernize-macro-to-enum,
-llvm-else-after-return,
-readability-else-after-return,
-misc-include-cleaner
-misc-include-cleaner,
-bugprone-multi-level-implicit-pointer-conversion,
-cppcoreguidelines-macro-to-enum
CheckOptions:
- key: readability-function-cognitive-complexity.Threshold
Expand Down
2 changes: 1 addition & 1 deletion src/agent/agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ static int agent_method_subscribe(sd_bus_message *m, void *userdata, UNUSED sd_b
}
agent->wildcard_subscription_active = true;

AgentUnitInfo info = { NULL, (char *) unit, true, true, -1, NULL };
AgentUnitInfo info = { NULL, (char *) unit, true, true, _UNIT_ACTIVE_STATE_INVALID, NULL };
agent_emit_unit_new(agent, &info, "virtual");

return sd_bus_reply_method_return(m, "");
Expand Down

0 comments on commit 6e23e2d

Please sign in to comment.