Following changes remove conditions where an unsigned integer is being tested to be greater or equal to zero.
These conditions will always remain true and will result in compiler warning though most compilers will optimize this out.
Differential D15357
Update code to silent some ARM/ARM64 specific compiler warnings omjavaid on Dec 8 2015, 3:20 PM. Authored by
Details
Following changes remove conditions where an unsigned integer is being tested to be greater or equal to zero. These conditions will always remain true and will result in compiler warning though most compilers will optimize this out.
Diff Detail Event TimelineComment Actions We discussed the same change recently (D13866) and the general opinion was that the original code have the right semantics and we don't want to change it just to silence some warnings. If you want to get rid of these warnings then I would suggest to do it with adding a cast before the comparison (I haven't tested it): if ((int)reg_num >= x0 && (int)reg_num <= pc) // We are casting to int to silence a gcc warning |