void func(char *inbuf) { unsigned int i; unsigned short *setup; unsigned int suwcnt = (unsigned)inbuf[63]; another_func(inbuf, *(unsigned short *)inbuf); for (i = 0; i < suwcnt; i++) setup[i] = *(const unsigned short *)(inbuf + i * 2); }