mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
lib: Adding explicit typecasts to fix C++ compilation issues
C++ does not allow implicit conversion from void pointer to a specific pointer type. This change adds explicit typecasts to appropriate types wherever needed. Signed-off-by: Shireesh Kumar Singh <shireeshkum@vmware.com> Signed-off-by: Sairam Venugopal <vsairam@vmware.com> Co-authored-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
committed by
Ben Pfaff
parent
538372329b
commit
8bfc3c105d
@@ -138,7 +138,7 @@ static inline int make_unix_socket(int style, bool nonblock,
|
||||
static inline int rpl_setsockopt(int sock, int level, int optname,
|
||||
const void *optval, socklen_t optlen)
|
||||
{
|
||||
return (setsockopt)(sock, level, optname, optval, optlen);
|
||||
return (setsockopt)(sock, level, optname, (const char *)optval, optlen);
|
||||
}
|
||||
|
||||
#define getsockopt(sock, level, optname, optval, optlen) \
|
||||
@@ -146,7 +146,7 @@ static inline int rpl_setsockopt(int sock, int level, int optname,
|
||||
static inline int rpl_getsockopt(int sock, int level, int optname,
|
||||
void *optval, socklen_t *optlen)
|
||||
{
|
||||
return (getsockopt)(sock, level, optname, optval, optlen);
|
||||
return (getsockopt)(sock, level, optname, (char *)optval, optlen);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user