URL:
  <http://savannah.nongnu.org/bugs/?37951>

                 Summary: qsort will throw throws warning
                 Project: AVR C Runtime Library
            Submitted by: gjlayde
            Submitted on: Di 18 Dez 2012 13:07:20 GMT
                Category: Library
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: libc code
                  Status: None
        Percent Complete: 0%
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.8.0
           Fixed Release: None

    _______________________________________________________

Details:

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





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?37951>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to