admac_status = ADMAC.ADMATE0.BYTE; ADMAC.ADMATE0.BYTE = (U8)~(HWI_SPI_ADMAC_RSPIB_MASK); (void)ADMAC.ADMATE0.BYTE; what is the need for the void typecasting ?
Note: ADMAC is a structure with one of its elt as ADMATE0 which is also a structure having BYTE as one of its union elt.
My guess is that the cast is there to suppress a warning. The statement has no effect (which could be what the warning would be if the cast were removed). You would need to ask the original programmer why that line is there; it seems pointless to me.