fix printf warnings in compiler.cpp

This commit is contained in:
Joel Dice 2009-05-28 19:12:26 -06:00
parent d99f8df6e6
commit b4dea1f71c

View File

@ -384,13 +384,15 @@ unsigned
RegisterResource::toString(Context* c, char* buffer, unsigned bufferSize) RegisterResource::toString(Context* c, char* buffer, unsigned bufferSize)
{ {
return snprintf return snprintf
(buffer, bufferSize, "register %d", this - c->registerResources); (buffer, bufferSize, "register %d", static_cast<int>
(this - c->registerResources));
} }
unsigned unsigned
FrameResource::toString(Context* c, char* buffer, unsigned bufferSize) FrameResource::toString(Context* c, char* buffer, unsigned bufferSize)
{ {
return snprintf(buffer, bufferSize, "frame %d", this - c->frameResources); return snprintf(buffer, bufferSize, "frame %d", static_cast<int>
(this - c->frameResources));
} }
class PoolPromise: public Promise { class PoolPromise: public Promise {