[dpdk-dev] [PATCH v2] bus/pci: netuio interface for windows

Ranjit Menon ranjit.menon at intel.com
Thu Sep 17 02:48:36 CEST 2020


Hi, Stephen

On 9/15/2020 6:54 PM, Stephen Hemminger wrote:
> On Tue, 15 Sep 2020 16:28:03 -0700
> Pallavi Kadam <pallavi.kadam at intel.com> wrote:
>
>> +	if (IsEqualGUID((const void *)&(device_info_data->ClassGuid),
>> +		(const void *)&GUID_DEVCLASS_NETUIO))
> Is there anyway to get rid of casts and have the right types?
> Casts are evil

Unfortunately, this macro is defined inside the Windows SDK and it 
simply calls the C library function memcmp() which expects a (void *).

Would something like this be acceptable?

const void *guid = &(device_info_data->ClassGuid);

const void *guid_netuio = &GUID_DEVCLASS_NETUIO;

if (IsEqualGUID(guid, guid_netuio)

....

ranjit m.



More information about the dev mailing list