Version: CVS HEAD (using KDE Devel) Installed from: Compiled sources Compiler: gcc 3.2 OS: Linux This is just a simple compilation fix for kdelibs/kdecore/malloc/malloc.c. Without the attached patch, I get the following error in CVS Head with ./configure --with-alsa --enable-fast-malloc=debug --with-xinerama --enable-debug=full and gcc 3.2: malloc.c:375:10: #if with no expression malloc.c:2475:12: operator '!' has no right operand malloc.c: In function `do_check_chunk': malloc.c:2504: warning: unused variable `sz' malloc.c:2507: warning: unused variable `min_address' malloc.c: In function `do_check_free_chunk': malloc.c:2554: warning: unused variable `av' malloc.c:2557: warning: unused variable `next' malloc.c: In function `do_check_remalloced_chunk': malloc.c:2637: warning: unused variable `sz' malloc.c:2632: warning: unused parameter `s' malloc.c: In function `do_check_malloc_state': malloc.c:2724: warning: comparison between signed and unsigned malloc.c: In function `sYSMALLOc': malloc.c:3163: warning: declaration of `brk' shadows a global declaration /usr/include/unistd.h:866: warning: shadowed declaration is here malloc.c: In function `mEMALIGn': malloc.c:4138: warning: declaration of `brk' shadows a global declaration /usr/include/unistd.h:866: warning: shadowed declaration is here malloc.c:4428:10: #if with no expression malloc.c: At top level: malloc.c:4625: warning: no previous prototype for `mSTATs' malloc.c:5732: warning: no previous prototype for `posix_memalign' malloc.c:4625: warning: `mSTATs' defined but not used make: *** [malloc.lo] Error 1
Created attachment 2076 [details] compilation fixes Created with diff -u malloc.old malloc.c
Subject: kdelibs/kdecore/malloc CVS commit by lunakl: #if DEBUG -> #ifdef DEBUG Thanks for the patch. CCMAIL: 61693-done@bugs.kde.org M +3 -3 malloc.c 1.13 --- kdelibs/kdecore/malloc/malloc.c #1.12:1.13 @@ -373,5 +373,5 @@ extern "C" { */ -#if DEBUG +#ifdef DEBUG #include <assert.h> #else @@ -2473,5 +2473,5 @@ static Void_t** iALLOc(); */ -#if ! DEBUG +#ifndef DEBUG #define check_chunk(P) @@ -4426,5 +4426,5 @@ static Void_t** iALLOc(n_elements, sizes } -#if DEBUG +#ifdef DEBUG if (marray != chunks) { /* final element must have exactly exhausted chunk */