On 28 November 2017 at 08:18, Ladi Prosek <lpro...@redhat.com> wrote: > On Tue, Nov 21, 2017 at 3:07 PM, Mihail Abakumov > <mikhail.abaku...@ispras.ru> wrote: >> Added some helper features for windbgstub.
> --- a/include/exec/windbgstub-utils.h > +++ b/include/exec/windbgstub-utils.h > @@ -32,7 +32,7 @@ > #define FMT_ERR "Error:%d" > > #define UINT8_P(ptr) ((uint8_t *) (ptr)) > -#define UINT32_P(ptr) ((uint32_t *) (ptr)) > +#define UINT32_P(ptr) ((uint32_t *) (size_t) (ptr)) > #define PTR(var) UINT8_P(&var) Hiding casts behind macros like this doesn't seem worthwhile to me anyway -- all it's doing is obscuring what's going on. And casting an arbitrary pointer to a uint32_t* is somewhat alarming -- the alignment requirements may not be met. Chances are high that code using that macro is not correct. thanks -- PMM