[OpenBIOS] [commit] r766 - in trunk/openbios-devel: arch/sparc64 include/libopenbios libopenbios
Tarl Neustaedter
tarl-b2 at tarl.net
Mon May 3 04:30:10 CEST 2010
On 2010-5-2 10:13 PM, Nick Couchman wrote:
> After the changes in this rev, I get the following trying to compile:
> [...]
> ../arch/sparc64/ofmem_sparc64.c: In function `ofmem_init':
> ../arch/sparc64/ofmem_sparc64.c:106: warning: comparison is always false due to limited range of data type
> make[1]: *** [target/arch/sparc64/ofmem_sparc64.o] Error 1
> make[1]: Leaving directory `/home/nick/Temp/openbios-devel/obj-sparc64'
> make: *** [build] Error 1
>
> I'm using gcc 3.4.5 cross-compilers with glibc 2.3.6.
>
Looks like missing parenthesis around "retained->magic == RETAIN_MAGIC".
> void ofmem_init( void )
> {
> - memset(&s_ofmem_data, 0, sizeof(s_ofmem_data));
> - s_ofmem_data.ofmem.ramsize = qemu_mem_size;
> + retain_t *retained = (retain_t *)RETAIN_OFMEM;
> +
> + /* Clear all memory except any retained areas */
> + if (!retained->magic == RETAIN_MAGIC) {
>
It's comparing a constant against a negated value.
More information about the OpenBIOS
mailing list