From b4dea1f71cab703bf41eb2af3c70ce15b85595d6 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 28 May 2009 19:12:26 -0600 Subject: [PATCH] fix printf warnings in compiler.cpp --- src/compiler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index e594e64717..1b9b95ca44 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -384,13 +384,15 @@ unsigned RegisterResource::toString(Context* c, char* buffer, unsigned bufferSize) { return snprintf - (buffer, bufferSize, "register %d", this - c->registerResources); + (buffer, bufferSize, "register %d", static_cast + (this - c->registerResources)); } unsigned 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 + (this - c->frameResources)); } class PoolPromise: public Promise {