All of lore.kernel.org
 help / color / mirror / Atom feed
* ethtool.h compile warning on c++
@ 2016-10-14 19:46 Ben Greear
  2016-10-17 13:56 ` Ivan Vecera
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Greear @ 2016-10-14 19:46 UTC (permalink / raw)
  To: netdev

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 <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ethtool.h compile warning on c++
  2016-10-14 19:46 ethtool.h compile warning on c++ Ben Greear
@ 2016-10-17 13:56 ` Ivan Vecera
  0 siblings, 0 replies; 2+ messages in thread
From: Ivan Vecera @ 2016-10-17 13:56 UTC (permalink / raw)
  To: Ben Greear, netdev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-17 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14 19:46 ethtool.h compile warning on c++ Ben Greear
2016-10-17 13:56 ` Ivan Vecera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.