> C++ does not have automatic casting to/from void pointers, so need > explicit cast if header is to be included in C++ code > > Fixes: f901d9c82688 ("ipsec: add helpers to group completed crypto-ops") > Cc: konstantin.anan...@intel.com > Cc: sta...@dpdk.org > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> > --- > lib/ipsec/rte_ipsec_group.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/ipsec/rte_ipsec_group.h b/lib/ipsec/rte_ipsec_group.h > index 60ab297710..62c2bd7217 100644 > --- a/lib/ipsec/rte_ipsec_group.h > +++ b/lib/ipsec/rte_ipsec_group.h > @@ -49,10 +49,10 @@ rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop) > > if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { > ss = cop->sym[0].sec_session; > - return (void *)(uintptr_t)ss->opaque_data; > + return (struct rte_ipsec_session *)(uintptr_t)ss->opaque_data; > } else if (cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) { > cs = cop->sym[0].session; > - return (void *)(uintptr_t)cs->opaque_data; > + return (struct rte_ipsec_session *)(uintptr_t)cs->opaque_data; > } > return NULL; > } > -- Acked-by: Konstantin Ananyev <konstantin.anan...@intel.com> > 2.32.0
- Re: [PATCH 6/7] vhost: remove non-C++ compatible ... Bruce Richardson
- RE: [PATCH 6/7] vhost: remove non-C++ compati... Wang, Xiao W
- Re: [PATCH 6/7] vhost: remove non-C++ com... Bruce Richardson
- [PATCH 7/7] buildtools/chkincs: test headers for C++ c... Bruce Richardson
- [PATCH v2 0/7] Verify C++ compatibility of public head... Bruce Richardson
- [PATCH v2 1/7] eal: fix header build with C++ Bruce Richardson
- Re: [PATCH v2 1/7] eal: fix header build with... David Marchand
- [PATCH v2 2/7] eventdev: fix header build with C+... Bruce Richardson
- [PATCH v2 3/7] graph: fix missing explicit cast f... Bruce Richardson
- [PATCH v2 4/7] ipsec: fix missing explicit cast f... Bruce Richardson
- RE: [PATCH v2 4/7] ipsec: fix missing explici... Ananyev, Konstantin
- [PATCH v2 5/7] table: fix missing explicit casts ... Bruce Richardson
- [PATCH v2 6/7] vhost: fix incompatible header inc... Bruce Richardson
- [PATCH v2 7/7] buildtools/chkincs: test headers f... Bruce Richardson
- [PATCH v3 0/7] Verify C++ compatibility of public head... Bruce Richardson
- [PATCH v3 1/7] eal: fix header build with C++ Bruce Richardson
- [PATCH v3 2/7] eventdev: fix header build with C+... Bruce Richardson
- [PATCH v3 3/7] graph: fix missing explicit cast f... Bruce Richardson
- [PATCH v3 4/7] ipsec: fix missing explicit cast f... Bruce Richardson
- [PATCH v3 5/7] table: fix missing explicit casts ... Bruce Richardson
- [PATCH v3 6/7] vhost: fix incompatible header inc... Bruce Richardson