summaryrefslogtreecommitdiff
path: root/community/visualboyadvance/1.7.2-gcc41.patch
blob: cacf8e25113c8bb3ce7e1e4cbc5dceaaf06bff8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff -ru src/prof/prof.cpp src/prof/prof.cpp
--- src/prof/prof.cpp	2004-05-14 00:31:58.000000000 +1000
+++ src/prof/prof.cpp	2006-06-03 13:49:41.000000000 +1000
@@ -266,7 +266,7 @@
     for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link) {
       if(profWrite8(fd, GMON_TAG_CG_ARC) ||
          profWrite32(fd, (u32)frompc) ||
-         profWrite32(fd, (u32)tos[toindex].selfpc) ||
+         profWrite32(fd, (u32)(intptr_t)tos[toindex].selfpc) ||
          profWrite32(fd, tos[toindex].count)) {
         systemMessage(0, "mcount: arc");
         fclose(fd);
diff -ru src/sdl/debugger.cpp src/sdl/debugger.cpp
--- src/sdl/debugger.cpp	2004-05-14 00:13:14.000000000 +1000
+++ src/sdl/debugger.cpp	2006-06-03 13:49:57.000000000 +1000
@@ -950,9 +950,9 @@
 {
   u32 address = 0;
   if(mem >= (u32*)&workRAM[0] && mem <= (u32*)&workRAM[0x3ffff])
-    address = 0x2000000 + ((u32)mem - (u32)&workRAM[0]);
+    address = 0x2000000 + ((u32)(intptr_t)mem - (u32)(intptr_t)&workRAM[0]);
   else
-    address = 0x3000000 + ((u32)mem - (u32)&internalRAM[0]);
+    address = 0x3000000 + ((u32)(intptr_t)mem - (u32)(intptr_t)&internalRAM[0]);
 
   if(size == 2)
     printf("Breakpoint (on write) address %08x old:%08x new:%08x\n",