-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address clang-tidy issues #163
Conversation
- Deal with a couple of unreferenced variables. - Remove gratuitous parentheses. Signed-off-by: Derek Foster <[email protected]>
@@ -216,7 +216,6 @@ void switchlink_process_link_msg(const struct nlmsghdr* nlmsg, int msgtype) { | |||
int linkinfo_attr_type; | |||
|
|||
switchlink_db_interface_info_t intf_info = {0}; | |||
switchlink_db_tunnel_interface_info_t tnl_intf_info = {0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreferenced variable. Moved inside #ifdef block.
@@ -123,11 +123,6 @@ void switchlink_process_neigh_msg(const struct nlmsghdr* nlmsg, int msgtype) { | |||
} else { | |||
intf_h = ifinfo.intf_h; | |||
} | |||
switchlink_handle_t bridge_h = g_default_bridge_h; | |||
if (ifinfo.intf_type == SWITCHLINK_INTF_TYPE_L2_ACCESS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we removing this block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy flagged bridge_h
as an unreferenced variable. It's only used in the krnlmon_assert
statement, which is disabled unless we build krnlmon in Debug mode. I didn't see this as a compelling reason to preserve what is otherwise dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Deal with a couple of unreferenced variables.
Remove gratuitous parentheses.