[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] quell compiler warning in malloc.c
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] quell compiler warning in malloc.c |
Date: |
Tue, 27 Aug 2002 23:10:12 +0200 |
User-agent: |
Mutt/1.2.5i |
As Theodore A. Roth wrote:
> Does this look like safe way to stop this compiler warning? (see patch
> below)
>
> ../../../../libc/stdlib/malloc.c:197: warning: assignment makes pointer
> from integer without a cast
>
> Joerg, I think you wrote this...
>
> I'm also getting these, but they don't look as trivial to fix:
>
> ../../../libc/stdlib/qsort.c:143: warning: comparison between signed and
> unsigned
> ../../../libc/stdlib/qsort.c:143: warning: signed and unsigned type in
> conditional expression
> ../../../libc/stdlib/qsort.c:145: warning: comparison between signed and
> unsigned
> ../../../libc/stdlib/qsort.c:147: warning: comparison between signed and
> unsigned
> ../../../libc/stdlib/strtol.c:123: warning: comparison between signed and
> unsigned
> ../../../libc/stdlib/strtol.c:123: warning: comparison between signed and
> unsigned
> ../../../libc/stdlib/strtoul.c:100: warning: comparison between signed and
> unsigned
> ../../../libc/stdlib/strtoul.c:100: warning: comparison between signed and
> unsigned
Hmm, i thought i've already fixed (or hidden :) all of them... Obviously,
i only posted the fix here, but never got any feedback. The signed/unsigned
warnings have the problem that we'd need more of the combined mul/div
functions in order to cover all possible combinations of signed/unsigned
non-long/long argument pairs in order to properly handle them.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/