AVR C Runtime Library - Bugs: bug #37951, qsort will throw throws warning
You are not allowed to post comments on this tracker with your current authentication level.
bug #37951: qsort will throw throws warning
Submitter: | Georg-Johann Lay <gjlayde> | ||
Submitted: | Tue 18 Dec 2012 01:07:20 PM UTC | ||
Category: | Library | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | libc code |
Status: | None | Assigned to: | None |
Percent Complete: | 0% | Open/Closed: | Open |
Release: | 1.8.0 | Fixed Release: | None |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
No changes have been made to this item
Powered by Savane 3.13-cf05.
Corresponding source code
Building qsort (SVN 2303) throws following build warnings with avr-gcc-4.8-trunk:
avr-gcc -DHAVE_CONFIG_H -I. -I../../../../../source/avr-libc-1.8/avr/lib/avrxmega7 -I../../.. -I../../../../../source/avr-libc-1.8/common -I../../../../../source/avr-libc-1.8/include -I../../../include -g -Wall -W -Wstrict-prototypes -mmcu=avrxmega7 -D__COMPILING_AVR_LIBC__ -Os -fno-jump-tables -MT qsort.o -MD -MP -MF .deps/qsort.Tpo -c -o qsort.o ../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c
../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c: In function 'qsort':
../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c:37:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define min(a, b) ((a) < (b) ? (a) : (b))
^
../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c:140:6: note: in expansion of macro 'min'
r = min(pd - pc, pn - pd - es);
^
../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c:37:36: warning: signed and unsigned type in conditional expression [-Wsign-compare]
#define min(a, b) ((a) < (b) ? (a) : (b))
^
../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c:140:6: note: in expansion of macro 'min'
r = min(pd - pc, pn - pd - es);
^
../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c:142:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((r = pb - pa) > es)
^
../../../../../source/avr-libc-1.8/libc/stdlib/qsort.c:144:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((r = pd - pc) > es) {
^