summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-01-17 10:17:10 +0800
committerXiang, Haihao <[email protected]>2007-01-17 10:17:10 +0800
commitafba8f0d30974bf7fbb9533f23eb2f92d49ac526 (patch)
tree7fabe9b0de80f55cfe2d9129e088e9718c9ffa77 /progs
parent7c8f311e406a4502982fd03e09d61f6269e0e82c (diff)
Fix bug#9673
Cast from pointer to unsinged long and cast to pointer from unsinged long
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/texdown.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/progs/demos/texdown.c b/progs/demos/texdown.c
index fc98fddb310..5fecd9a1489 100644
--- a/progs/demos/texdown.c
+++ b/progs/demos/texdown.c
@@ -149,7 +149,7 @@ TypeStr(GLenum type)
*/
#define ALIGN (1<<12)
-static unsigned align(unsigned value, unsigned a)
+static unsigned long align(unsigned long value, unsigned long a)
{
return (value + a - 1) & ~(a-1);
}
@@ -186,10 +186,10 @@ MeasureDownloadRate(void)
printf("alloc %p %p\n", orig_texImage, orig_getImage);
- texImage = (GLubyte *)align((unsigned)orig_texImage, ALIGN);
- getImage = (GLubyte *)align((unsigned)orig_getImage, ALIGN);
+ texImage = (GLubyte *)align((unsigned long)orig_texImage, ALIGN);
+ getImage = (GLubyte *)align((unsigned long)orig_getImage, ALIGN);
- for (i = 1; !(((unsigned)texImage) & i); i<<=1)
+ for (i = 1; !(((unsigned long)texImage) & i); i<<=1)
;
printf("texture image alignment: %d bytes (%p)\n", i, texImage);