Re: [PATCH] fix some compiler warnings
Reply #2 –
- id += 12345+(7*id)&0x0FFF;
+ id += (12345 + 7*id) & 0x0FFF;
Operator precedence in C is *, +, & (with * being the strongest), so the first line is the same as
id += (12345 + (7*id)) & 0x0FFF;
then I only dropped the parenthesis around the multiplication.
All patches except the first one should not change the behavior of the program in any way.
Ansgar