Turned off an unneeded warning, added
[fw/sdcc] / support / regression / tests / bug-524209.c
1 /* Problem with casts and warnings.
2  */
3 #include <testfwk.h>
4 #include <string.h>
5
6 typedef unsigned short UINT16;
7
8 typedef struct _Class Class;
9
10 typedef struct _Instance
11 {
12   Class *pClass;
13 } Instance;
14
15 typedef struct _StringBuffer
16 {
17   Instance header;
18   UINT16 uLength;
19   UINT16 uMaxLength;
20 } StringBuffer;
21
22
23 void _scan(StringBuffer *pSB)
24 {
25   UNUSED(pSB);
26 }
27
28 void checkCast(void *pIn)
29 {
30   Instance *p = (Instance *)pIn;
31   _scan((StringBuffer *)p);
32 }
33