-- CC (gcc) [kamailio] mem/tlsf_malloc.o mem/tlsf_malloc.c: In function ‘tlsf_malloc_init_pkg_manager’: mem/tlsf_malloc.c:1353:16: warning: assignment from incompatible pointer type ma.xmalloc = tlsf_malloc; ^ mem/tlsf_malloc.c:1355:16: warning: assignment from incompatible pointer type ma.xrealloc = tlsf_realloc; ^ mem/tlsf_malloc.c:1358:16: warning: assignment from incompatible pointer type ma.xavailable = tlsf_available; ^ mem/tlsf_malloc.c: In function ‘tlsf_malloc_init_shm_manager’: mem/tlsf_malloc.c:1501:20: warning: assignment from incompatible pointer type ma.xmalloc_unsafe = tlsf_malloc; ^
What is the gcc version and cpu architecture? The prototypes should be equivalent, I am not getting the warnings on couple of debians/ubuntus and macosx.
Cheers, Daniel
On 22/01/16 03:24, Ovidiu Sas wrote:
-- CC (gcc) [kamailio] mem/tlsf_malloc.o mem/tlsf_malloc.c: In function ‘tlsf_malloc_init_pkg_manager’: mem/tlsf_malloc.c:1353:16: warning: assignment from incompatible pointer type ma.xmalloc = tlsf_malloc; ^ mem/tlsf_malloc.c:1355:16: warning: assignment from incompatible pointer type ma.xrealloc = tlsf_realloc; ^ mem/tlsf_malloc.c:1358:16: warning: assignment from incompatible pointer type ma.xavailable = tlsf_available; ^ mem/tlsf_malloc.c: In function ‘tlsf_malloc_init_shm_manager’: mem/tlsf_malloc.c:1501:20: warning: assignment from incompatible pointer type ma.xmalloc_unsafe = tlsf_malloc; ^
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
gcc version 4.9.2 (Debian 4.9.2-10)
$ uname -a Linux t40 3.16.0-4-586 #1 Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) i686 GNU/Linux
debian 8.2 on 32bit.
-ovidiu
On Sun, Jan 24, 2016 at 7:37 AM, Daniel-Constantin Mierla miconda@gmail.com wrote:
What is the gcc version and cpu architecture? The prototypes should be equivalent, I am not getting the warnings on couple of debians/ubuntus and macosx.
Cheers, Daniel
On 22/01/16 03:24, Ovidiu Sas wrote:
-- CC (gcc) [kamailio] mem/tlsf_malloc.o mem/tlsf_malloc.c: In function ‘tlsf_malloc_init_pkg_manager’: mem/tlsf_malloc.c:1353:16: warning: assignment from incompatible pointer type ma.xmalloc = tlsf_malloc; ^ mem/tlsf_malloc.c:1355:16: warning: assignment from incompatible pointer type ma.xrealloc = tlsf_realloc; ^ mem/tlsf_malloc.c:1358:16: warning: assignment from incompatible pointer type ma.xavailable = tlsf_available; ^ mem/tlsf_malloc.c: In function ‘tlsf_malloc_init_shm_manager’: mem/tlsf_malloc.c:1501:20: warning: assignment from incompatible pointer type ma.xmalloc_unsafe = tlsf_malloc; ^
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com http://miconda.eu
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Le Mon, 25 Jan 2016 22:18:24 -0500, Ovidiu Sas osas@voipembedded.com a écrit :
gcc version 4.9.2 (Debian 4.9.2-10)
$ uname -a Linux t40 3.16.0-4-586 #1 Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) i686 GNU/Linux
debian 8.2 on 32bit.
TLSF prototypes use size_t to represent chunk size, while the memory API expects unsigned long. I thought this would be equivalent (same size and same signedness). What do sizeof(size_t) and sizeof(unsigned long) return on this platform?
sizeof(size_t) returns 'unsigned int' sizeof(unsigned long) returns 'unsigned int'
-ovidiu
On Tue, Jan 26, 2016 at 8:44 AM, Camille Oudot camille.oudot@orange.com wrote:
Le Mon, 25 Jan 2016 22:18:24 -0500, Ovidiu Sas osas@voipembedded.com a écrit :
gcc version 4.9.2 (Debian 4.9.2-10)
$ uname -a Linux t40 3.16.0-4-586 #1 Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) i686 GNU/Linux
debian 8.2 on 32bit.
TLSF prototypes use size_t to represent chunk size, while the memory API expects unsigned long. I thought this would be equivalent (same size and same signedness). What do sizeof(size_t) and sizeof(unsigned long) return on this platform?
-- Camille
Le Tue, 26 Jan 2016 09:10:21 -0500, Ovidiu Sas osas@voipembedded.com a écrit :
sizeof(size_t) returns 'unsigned int' sizeof(unsigned long) returns 'unsigned int'
Hi,
I meant the output of a C program such as:
#include <stdio.h>
int main(void) { printf("%zd %zd\n", sizeof(size_t), sizeof(unsigned long)); return 0; }
$ ./a.out 4 4
On Tue, Jan 26, 2016 at 2:19 PM, Camille Oudot camille.oudot@orange.com wrote:
Le Tue, 26 Jan 2016 09:10:21 -0500, Ovidiu Sas osas@voipembedded.com a écrit :
sizeof(size_t) returns 'unsigned int' sizeof(unsigned long) returns 'unsigned int'
Hi,
I meant the output of a C program such as:
#include <stdio.h> int main(void) { printf("%zd %zd\n", sizeof(size_t), sizeof(unsigned long)); return 0; }
-- Camille