]> git.pld-linux.org Git - packages/LeakTracer.git/blob - LeakTracer-64bit.patch
- fix behaviour on 64-bit platofrms.
[packages/LeakTracer.git] / LeakTracer-64bit.patch
1 This patch fixes build on 64-bit platforms.
2
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'
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.150204 seconds and 4 git commands to generate.