Signed comparison warning fixes.

This commit is contained in:
Fyren
2015-03-06 08:08:41 +00:00
parent 782eee3c58
commit d3da389f9f
16 changed files with 44 additions and 39 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ FileReader::FileReader(FILE *fp)
return;
ke::AutoArray<uint8_t> bytes(new uint8_t[size]);
if (!bytes || fread(bytes, sizeof(uint8_t), size, fp) != size)
if (!bytes || fread(bytes, sizeof(uint8_t), size, fp) != (size_t)size)
return;
buffer_ = bytes.take();
+4 -4
View File
@@ -21,7 +21,7 @@ using namespace ke;
using namespace sp;
using namespace SourcePawn;
InvokeFrame::InvokeFrame(PluginContext *cx, cell_t entry_cip)
InvokeFrame::InvokeFrame(PluginContext *cx, ucell_t entry_cip)
: prev_(Environment::get()->top()),
cx_(cx),
prev_exit_frame_(Environment::get()->exit_frame()),
@@ -82,7 +82,7 @@ FrameIterator::nextInvokeFrame()
assert(sp_stop_ >= sp_iter_);
runtime_ = ivk_->cx()->runtime();
function_cip_ = -1;
function_cip_ = kInvalidCip;
pc_ = nullptr;
cip_ = kInvalidCip;
@@ -170,7 +170,7 @@ FrameIterator::findCip() const
unsigned
FrameIterator::LineNumber() const
{
cell_t cip = findCip();
ucell_t cip = findCip();
if (cip == kInvalidCip)
return 0;
@@ -184,7 +184,7 @@ FrameIterator::LineNumber() const
const char *
FrameIterator::FilePath() const
{
cell_t cip = findCip();
ucell_t cip = findCip();
if (cip == kInvalidCip)
return runtime_->image()->LookupFile(function_cip_);
+5 -5
View File
@@ -64,7 +64,7 @@ class ExitFrame
class InvokeFrame
{
public:
InvokeFrame(PluginContext *cx, cell_t cip);
InvokeFrame(PluginContext *cx, ucell_t cip);
~InvokeFrame();
InvokeFrame *prev() const {
@@ -80,7 +80,7 @@ class InvokeFrame
const intptr_t *entry_sp() const {
return entry_sp_;
}
cell_t entry_cip() const {
ucell_t entry_cip() const {
return entry_cip_;
}
@@ -93,7 +93,7 @@ class InvokeFrame
InvokeFrame *prev_;
PluginContext *cx_;
ExitFrame prev_exit_frame_;
cell_t entry_cip_;
ucell_t entry_cip_;
const intptr_t *entry_sp_;
};
@@ -125,8 +125,8 @@ class FrameIterator : public SourcePawn::IFrameIterator
PluginRuntime *runtime_;
const intptr_t *sp_iter_;
const intptr_t *sp_stop_;
cell_t function_cip_;
mutable cell_t cip_;
ucell_t function_cip_;
mutable ucell_t cip_;
void *pc_;
};