On Wed, May 19, 2010 at 10:52 AM, Christian Siebert <[email protected]> wrote: > Location: in src/lib/libc/stdlib/merge.c in function setup() > What is wrong: variable 'tmp' is an 'int' type > Correction: this variable 'tmp' should be an 'u_char' type > > While this variable 'tmp' is used correctly in the other function > insertionsort(), it is here (in setup) used incorrectly. At best, the > compiler detects this problem (icc for example issues a remark) and corrects > it automatically. More likely (gcc?) it just turns into unnecessary type > conversions, leading to some performance loss. In the worst case (I > think/hope not), this might even be problematic, because the result is > written back to memory within the macros swap() and reverse().
Not a big deal. A uchar fits in an int without conversion, so it will go back into a uchar without trouble. But thanks for pointing it out, it's still a bug.
