bugAVR 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

Tue 18 Dec 2012 01:07:20 PM UTC, original submission:  

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) {
                    ^

Georg-Johann Lay <gjlayde>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gjlayde (Submitted the item)
  •  

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4e86.
    Corresponding source code