unsigned char is promoted to int, which lacks the 32nd bit to make 0xff << 24 work. Explicitly cast to unsigned int to make it clear what we want to happen.
unsigned char is promoted to int, which lacks the 32nd bit to make 0xff << 24 work. Explicitly cast to unsigned int to make it clear what we want to happen.