as to stop gcc complaining so much on 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6306
static void *t1(void *v)
{
- return (void *)(shared + 44);
+ return (void *)(long)(shared + 44);
}
static void *t2(void *v)
{
- return (void *)(shared + 55);
+ return (void *)(long)(shared + 55);
}
int main()
assert( 0 == brk(orig_ds) ); // libc brk()
for (i = 0; EOL != vals[i]; i++) {
- res = (void*)brk(vals[i]);
+ res = (void*)(long)brk(vals[i]);
}
return 0;
static const struct test *cur_test;
-static int zero();
-
static jmp_buf escape;
#define BADADDR ((int *)0x1234)
return 0;
}
-static int zero()
-{
- return 0;
-}
{
//ucontext_t *ucontext = (ucontext_t *)arg;
- int mypos = (int) pthread_getspecific(pKey);
+ long mypos = (long) pthread_getspecific(pKey);
// int threadPos = (int)pthread_getspecific(srThreadKey);
}
void *threadfunc(void *arg) {
- int mypos = (int)arg;
- int i;
+ long mypos = (long)arg;
+ long i;
long square = 1;
void* altstack = setup_altstack();
int main(int argc, char ** argv) {
pthread_t threads[THREAD_COUNT];
pthread_attr_t attr;
- int result;
- int i;
- int iteration;
- int finished;
+ long result;
+ long i;
+ long iteration;
+ long finished;
initSignalling();
static void *threadmain( void *dummy )
{
- sleep( (int)dummy );
+ sleep( (unsigned long)dummy );
return NULL;
}
fprintf(stderr, "Attempting too-big mmap()...\n");
p = mmap( 0, size, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, -1, 0 );
- if (-1 != (int)p)
+ if (-1 != (long)p)
fprintf(stderr, "huge mmap() succeeded??\n");
return 0;