Message ID | 1442951618-13080-7-git-send-email-aserdean@cloudbasesolutions.com |
---|---|
State | Rejected |
Headers | show |
On Tue, Sep 22, 2015 at 12:53 PM, Alin Serdean <aserdean@cloudbasesolutions.com> wrote: > We will support x64 bit compiling making this build assert outdated. > > Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> > --- > lib/netlink-socket.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c > index 42eb232..6722a86 100644 > --- a/lib/netlink-socket.c > +++ b/lib/netlink-socket.c > @@ -1248,7 +1248,6 @@ int > nl_sock_fd(const struct nl_sock *sock) > { > #ifdef _WIN32 > - BUILD_ASSERT_DECL(sizeof sock->handle == sizeof(int)); > return (int)sock->handle; What is the size of handle in 64 bit? If it is 64 bit, won't it get truncated? > #else > return sock->fd; > -- > 1.9.5.msysgit.0 > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev
Thanks for the review. It does not matter. nl_sock_fd is not used under windows. I could send out another patch in which I can ifdef it out. Alin. > -----Mesaj original----- > De la: Gurucharan Shetty [mailto:shettyg@nicira.com] > Trimis: Wednesday, September 23, 2015 6:06 PM > Către: Alin Serdean <aserdean@cloudbasesolutions.com> > Cc: dev@openvswitch.org > Subiect: Re: [ovs-dev] [PATCH 6/7] Remove build assert > > On Tue, Sep 22, 2015 at 12:53 PM, Alin Serdean > <aserdean@cloudbasesolutions.com> wrote: > > We will support x64 bit compiling making this build assert outdated. > > > > Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> > > --- > > lib/netlink-socket.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index > > 42eb232..6722a86 100644 > > --- a/lib/netlink-socket.c > > +++ b/lib/netlink-socket.c > > @@ -1248,7 +1248,6 @@ int > > nl_sock_fd(const struct nl_sock *sock) { #ifdef _WIN32 > > - BUILD_ASSERT_DECL(sizeof sock->handle == sizeof(int)); > > return (int)sock->handle; > > What is the size of handle in 64 bit? If it is 64 bit, won't it get truncated? > > > #else > > return sock->fd; > > -- > > 1.9.5.msysgit.0 > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > http://openvswitch.org/mailman/listinfo/dev
diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 42eb232..6722a86 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -1248,7 +1248,6 @@ int nl_sock_fd(const struct nl_sock *sock) { #ifdef _WIN32 - BUILD_ASSERT_DECL(sizeof sock->handle == sizeof(int)); return (int)sock->handle; #else return sock->fd;
We will support x64 bit compiling making this build assert outdated. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> --- lib/netlink-socket.c | 1 - 1 file changed, 1 deletion(-)