]> git.pld-linux.org Git - packages/LeakTracer.git/blame - LeakTracer-64bit.patch
- release 2
[packages/LeakTracer.git] / LeakTracer-64bit.patch
CommitLineData
35e4d67a
PS
1This patch fixes build on 64-bit platforms.
2
3LeakTracer.cc: In member function 'void LeakTracer::initialize()':
4LeakTracer.cc:195: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
5LeakTracer.cc: In member function 'void* LeakTracer::registerAlloc(size_t, bool)':
6LeakTracer.cc:288: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
7LeakTracer.cc: In member function 'void LeakTracer::registerFree(void*, bool)':
8LeakTracer.cc:416: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
9LeakTracer.cc:427: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
10LeakTracer.cc:429: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
11
12--- LeakTracer.cc.orig 2005-12-10 23:13:59.287782624 +0000
13+++ LeakTracer.cc 2005-12-10 23:17:14.286138368 +0000
14@@ -192,7 +192,7 @@
15 memset ((void*) leakHash, 0x00, SOME_PRIME * sizeof(int));
16
17 #ifdef MAGIC
18- fprintf (report, "# memory overrun protection of %d Bytes\n", MAGIC_SIZE);
19+ fprintf (report, "# memory overrun protection of %zd Bytes\n", MAGIC_SIZE);
20 #endif
21
22 #ifdef SAVEVALUE
23@@ -285,7 +285,7 @@
24 // fprintf(stderr, "LeakTracer::registerAlloc()\n");
25
26 if (destroyed) {
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);
30 }
31
32@@ -408,7 +408,7 @@
33 if (leaks[i].type != type) {
34 fprintf(report,
35 "S %10p %10p # new%s but delete%s "
36- "; size %d\n",
37+ "; size %zd\n",
38 leaks[i].allocAddr,
39 __builtin_return_address(1),
40 ((!type) ? "[]" : " normal"),
41@@ -421,11 +421,11 @@
42 if (memcmp((char*)p + leaks[i].size, MAGIC, MAGIC_SIZE)) {
43 fprintf(report, "O %10p %10p "
44 "# memory overwritten beyond allocated"
45- " %d bytes\n",
46+ " %zd bytes\n",
47 leaks[i].allocAddr,
48 __builtin_return_address(1),
49 leaks[i].size);
50- fprintf(report, "# %d byte beyond area:\n",
51+ fprintf(report, "# %zd byte beyond area:\n",
52 MAGIC_SIZE);
53 hexdump((unsigned char*)p+leaks[i].size,
54 MAGIC_SIZE);
This page took 0.038076 seconds and 4 git commands to generate.