[squeak-dev] reading objects of a dead image

Levente Uzonyi leves at elte.hu
Sun May 15 18:22:47 UTC 2011


On Sun, 15 May 2011, Chris Cunnington wrote:

> I took the file sq-0001.c and compiled it. I got this error:
>
> sq-0001.c: In function ?main?:
> sq-0001.c:165: warning: format ?%d? expects type ?int?, but argument 3 has 
> type ?long unsigned int?

That's just a warning, but your compiler is a bit too strict and reports 
warnings as errors. You can fix it by replacing

printf("Warning: header size mismatch: %d %d\n", header.headerSize, sizeof(header));

with

printf("Warning: header size mismatch: %d %u\n", header.headerSize, sizeof(header));


Levente

>
> I removed the following:
>
> if (header.headerSize != sizeof(header))
> printf("Warning: header size mismatch: %d %d\n", header.headerSize, 
> sizeof(header));
>
> Then it compiled.
>
> I took a 61K image from MicroSqueak and ran
>
> ./sq chico.image
>
> and it hung until I hit Control+c. I tried it on a 4.2 image and the same 
> thing resulted.
>
> If I've approached this incorrectly somehow, I'd be happy to know how.
>
> Chris
>
>
>



More information about the Squeak-dev mailing list