1 This patch fixes build on 64-bit platforms.
3 LeakTracer.cc: In member function 'void LeakTracer::initialize()':
4 LeakTracer.cc:195: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
5 LeakTracer.cc: In member function 'void* LeakTracer::registerAlloc(size_t, bool)':
6 LeakTracer.cc:288: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
7 LeakTracer.cc: In member function 'void LeakTracer::registerFree(void*, bool)':
8 LeakTracer.cc:416: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
9 LeakTracer.cc:427: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
10 LeakTracer.cc:429: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
12 --- LeakTracer.cc.orig 2005-12-10 23:13:59.287782624 +0000
13 +++ LeakTracer.cc 2005-12-10 23:17:14.286138368 +0000
15 memset ((void*) leakHash, 0x00, SOME_PRIME * sizeof(int));
18 - fprintf (report, "# memory overrun protection of %d Bytes\n", MAGIC_SIZE);
19 + fprintf (report, "# memory overrun protection of %zd Bytes\n", MAGIC_SIZE);
24 // fprintf(stderr, "LeakTracer::registerAlloc()\n");
27 - fprintf(stderr, "Oops, registerAlloc called after destruction of LeakTracer (size=%d)\n", size);
28 + fprintf(stderr, "Oops, registerAlloc called after destruction of LeakTracer (size=%zd)\n", size);
29 return LT_MALLOC(size);
33 if (leaks[i].type != type) {
35 "S %10p %10p # new%s but delete%s "
39 __builtin_return_address(1),
40 ((!type) ? "[]" : " normal"),
42 if (memcmp((char*)p + leaks[i].size, MAGIC, MAGIC_SIZE)) {
43 fprintf(report, "O %10p %10p "
44 "# memory overwritten beyond allocated"
48 __builtin_return_address(1),
50 - fprintf(report, "# %d byte beyond area:\n",
51 + fprintf(report, "# %zd byte beyond area:\n",
53 hexdump((unsigned char*)p+leaks[i].size,