Type Punning Functions in C
If your C compiler doesn't complain bitterly to you about an incompatible pointer type on that assignment, get a better C compiler.  If your C compiler does complain bitterly about it, heed those warnings or expect no sympathy.If you write this in production code, and don't get sent home that day in tears, your company's code review process has failed.