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 _scan(StringBuffer * pSB)23void _scan(StringBuffer *pSB) 24 { 25 UNUSED(pSB); 26 } 27 checkCast(void * pIn)28void checkCast(void *pIn) 29 { 30 Instance *p = (Instance *)pIn; 31 _scan((StringBuffer *)p); 32 } 33 testBug(void)34void testBug(void) 35 { 36 } 37