View Single Post
Old 16 June 2021, 13:11   #13
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Warty View Post
Code:
    unsigned long    win_resize_gadget_width = 18;
     unsigned long    win_resize_gadget_height = 11;    // Default size
This is the problem!

Quote:
Code:
GetAttr ((unsigned long)IA_Width, (APTR)win_resize_image, (unsigned long*)&win_resize_gadget_width);
And casting to
unsigned long*
doesn't help much, when GetAttr() needs an
ULONG*
.

I found out that the exec/types.h header from NDK 3.2 uses C99 stdint.h to define the AmigaOS types like ULONG. In the past it was simply defined as unsigned long. Now ULONG is defined as:
Code:
typedef uint32_t        ULONG;          /* unsigned 32-bit quantity */
While vbcc defines uint32_t in stdint.h as:
Code:
typedef unsigned int uint32_t;
This explains the warning, because different types (for the compiler) are referenced. The fix is simple. Just use ULONG when you need ULONG.
phx is offline  
 
Page generated in 0.04546 seconds with 11 queries