Just some casting stuff: --- embed.c~ Fri Feb 1 08:08:31 2002 +++ embed.c Fri Feb 1 08:12:22 2002 @@ -56,7 +56,7 @@
program_size = 0; - program_code = (char*)malloc(program_size + 1024); + program_code = (char*)malloc((unsigned)program_size + 1024); if (NULL == program_code) { fprintf(stderr, "Parrot VM: Could not allocate buffer to read packfile from stdin.\n"); return NULL; @@ -65,7 +65,7 @@ while ((read_result = read(0, cursor, 1024)) > 0) { program_size += read_result; - program_code = realloc(program_code, program_size + 1024); + program_code = realloc(program_code, (unsigned)program_size + 1024); if (NULL == program_code) { fprintf(stderr, "Parrot VM: Could not reallocate buffer while reading packfile from stdin.\n"); @@ -111,7 +111,7 @@ #else - program_code = mmap(0, program_size, PROT_READ, MAP_SHARED, fd, (off_t)0); + program_code = mmap(0, (unsigned)program_size, PROT_READ, MAP_SHARED, fd, +(off_t)0); if (!program_code) { fprintf(stderr, "Parrot VM: Can't read file %s, code %i.\n", filename, errno); @@ -124,7 +124,7 @@ pf = PackFile_new(); - if(!PackFile_unpack(interpreter, pf, program_code, program_size) ) { + if(!PackFile_unpack(interpreter, pf, program_code, (unsigned)program_size) ) { fprintf(stderr, "Parrot VM: Can't unpack packfile %s.\n", filename); return NULL; } @@ -171,7 +171,7 @@ for(i=0; i < argc; i++) { if(interpreter->flags & PARROT_DEBUG_FLAG) { - fprintf(stderr, "\t%d: %s\n", i, argv[i]); + fprintf(stderr, "\t%d: %s\n", (int)i, argv[i]); } userargv->vtable->set_string_index(interpreter, userargv, /J\ -- Jonathan Stowe | <http://www.gellyfish.com> | This space for rent |