git: d21b513988b7 - main - ctld: Be more explicit in a few uses of types to avoid potential ambiguity
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Aug 2025 21:11:48 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=d21b513988b7d685edf2ad77886b3e3c95cc0df8
commit d21b513988b7d685edf2ad77886b3e3c95cc0df8
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-08-07 21:11:31 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-08-07 21:11:31 +0000
ctld: Be more explicit in a few uses of types to avoid potential ambiguity
This appeases -Wchanges-meaning warnings from GCC.
Sponsored by: Chelsio Communications
---
usr.sbin/ctld/ctld.hh | 4 ++--
usr.sbin/ctld/kernel.cc | 6 +++---
usr.sbin/ctld/nvmf_discovery.cc | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh
index a5aab65e339b..bfe4507bb3e6 100644
--- a/usr.sbin/ctld/ctld.hh
+++ b/usr.sbin/ctld/ctld.hh
@@ -157,7 +157,7 @@ struct portal {
virtual void handle_connection(freebsd::fd_up fd, const char *host,
const struct sockaddr *client_sa) = 0;
- portal_group *portal_group() const { return p_portal_group; }
+ struct portal_group *portal_group() const { return p_portal_group; }
const char *listen() const { return p_listen.c_str(); }
const addrinfo *ai() const { return p_ai.get(); }
portal_protocol protocol() const { return p_protocol; }
@@ -196,7 +196,7 @@ struct portal_group {
bool is_redirecting() const { return !pg_redirection.empty(); }
struct auth_group *discovery_auth_group() const
{ return pg_discovery_auth_group.get(); }
- discovery_filter discovery_filter() const
+ enum discovery_filter discovery_filter() const
{ return pg_discovery_filter; }
int dscp() const { return pg_dscp; }
const char *offload() const { return pg_offload.c_str(); }
diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc
index b214cd4e8c29..6b17ce60ac69 100644
--- a/usr.sbin/ctld/kernel.cc
+++ b/usr.sbin/ctld/kernel.cc
@@ -106,7 +106,7 @@ kernel_init(void)
/*
* Backend LUN information.
*/
-using attr_list = std::list<std::pair<std::string, std::string>>;
+using attr_list_t = std::list<std::pair<std::string, std::string>>;
struct cctl_lun {
uint64_t lun_id;
@@ -117,7 +117,7 @@ struct cctl_lun {
std::string serial_number;
std::string device_id;
std::string ctld_name;
- attr_list attr_list;
+ attr_list_t attr_list;
};
struct cctl_port {
@@ -133,7 +133,7 @@ struct cctl_port {
uint16_t cfiscsi_portal_group_tag;
std::string ctld_portal_group_name;
std::string ctld_transport_group_name;
- attr_list attr_list;
+ attr_list_t attr_list;
};
struct cctl_devlist_data {
diff --git a/usr.sbin/ctld/nvmf_discovery.cc b/usr.sbin/ctld/nvmf_discovery.cc
index a32094ddafa1..839b69fdac14 100644
--- a/usr.sbin/ctld/nvmf_discovery.cc
+++ b/usr.sbin/ctld/nvmf_discovery.cc
@@ -62,7 +62,7 @@ private:
struct nvme_controller_data cdata;
- const discovery_log &discovery_log;
+ const struct discovery_log &discovery_log;
freebsd::fd_up s;
};