-----Original Message-----
From: Stephen Hemminger [mailto:stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org]
Sent: Sunday, January 25, 2015 4:05 PM
To: Liang, Cunming
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [dpdk-dev] [PATCH v1 09/15] malloc: fix the issue of SOCKET_ID_ANY
On Thu, 22 Jan 2015 16:16:32 +0800
Cunming Liang [off-list ref] wrote:
quoted
- return rte_socket_id();
+ unsigned socket_id = rte_socket_id();
+
+ if (socket_id == (unsigned)SOCKET_ID_ANY)
I prefer not casting -1 to unsigned it will cause warnings.
It is better to make socket_id an integer and then have
the implicit cast in the return.
[Liang, Cunming] I didn't got warning about it, in which version of compiler complain it ?