bugAVR C Runtime Library - Bugs: bug #37951, qsort will throw throws warning

 
 

bug #37951: qsort will throw throws warning

Submitted by:  Georg-Johann Lay <gjlayde>
Submitted on:  Tue 18 Dec 2012 01:07:20 PM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: libc code
Status: NonePercent Complete: 0%
Assigned to: NoneOpen/Closed: Open
Release: 1.8.0Fixed Release: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup