ethtool.h compile warning on c++

2 messages, 2 authors, 2016-10-17 · open the first message on its own page

ethtool.h compile warning on c++

From: Ben Greear <hidden>
Date: 2016-10-14 19:47:01

I am getting warnings about sign missmatch.

Maybe make SPEED_UNKNOWN be ((__u32)(0xFFFFFFFF)) ?

from ethtool.h:

#define SPEED_UNKNOWN           -1

static inline int ethtool_validate_speed(__u32 speed)
{
         return speed <= INT_MAX || speed == SPEED_UNKNOWN;
}

Thanks,
Ben

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com

Re: ethtool.h compile warning on c++

From: Ivan Vecera <ivecera@redhat.com>
Date: 2016-10-17 13:56:54

Dne 14.10.2016 v 21:46 Ben Greear napsal(a):
I am getting warnings about sign missmatch.

Maybe make SPEED_UNKNOWN be ((__u32)(0xFFFFFFFF)) ?
The 0xFFFFFFFFU could be better.

Ivan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help