diff --git a/ares_data.c b/ares_data.c index 16a5cc50..ee760185 100644 --- a/ares_data.c +++ b/ares_data.c @@ -45,8 +45,18 @@ void ares_free_data(void *dataptr) if (!dataptr) return; +#ifdef __INTEL_COMPILER +# pragma warning(push) +# pragma warning(disable:1684) + /* 1684: conversion from pointer to same-sized integral type */ +#endif + ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data)); +#ifdef __INTEL_COMPILER +# pragma warning(pop) +#endif + if (ptr->mark != ARES_DATATYPE_MARK) return; @@ -134,8 +144,18 @@ ares_datatype ares_get_datatype(void * dataptr) { struct ares_data *ptr; +#ifdef __INTEL_COMPILER +# pragma warning(push) +# pragma warning(disable:1684) + /* 1684: conversion from pointer to same-sized integral type */ +#endif + ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data)); +#ifdef __INTEL_COMPILER +# pragma warning(pop) +#endif + if (ptr->mark == ARES_DATATYPE_MARK) return ptr->type;