Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
simonster committed Nov 10, 2014
1 parent 6628d52 commit e2500db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ static Value *emit_getfield(jl_value_t *expr, jl_sym_t *name, jl_codectx_t *ctx)
MDNode *tbaa = sty->mutabl ? tbaa_user : tbaa_immut;
if (sty->fields[idx].isptr) {
Value *fldv = tbaa_decorate(tbaa, builder.CreateLoad(builder.CreateBitCast(addr,jl_ppvalue_llvmt)));
if (idx >= sty->ninitialized) {
if (idx >= (unsigned)sty->ninitialized) {
null_pointer_check(fldv, ctx);
}
return fldv;
Expand All @@ -1516,7 +1516,7 @@ static Value *emit_getfield(jl_value_t *expr, jl_sym_t *name, jl_codectx_t *ctx)
if (jfty == (jl_value_t*)jl_bool_type) {
fldv = builder.CreateTrunc(fldv, T_int1);
}
else if (sty->fields[idx].isptr && idx >= sty->ninitialized) {
else if (sty->fields[idx].isptr && idx >= (unsigned)sty->ninitialized) {
null_pointer_check(fldv, ctx);
}
JL_GC_POP();
Expand Down Expand Up @@ -2146,7 +2146,7 @@ static Value *emit_known_call(jl_value_t *ff, jl_value_t **args, size_t nargs,
CreateGEP(builder.
CreateBitCast(strct, jl_ppvalue_llvmt),
builder.CreateAdd(idx,ConstantInt::get(T_size,1)))));
if (stt->ninitialized != jl_tuple_len(stt->types)) {
if ((unsigned)stt->ninitialized != jl_tuple_len(stt->types)) {
null_pointer_check(fld, ctx);
}
JL_GC_POP();
Expand Down
2 changes: 1 addition & 1 deletion src/disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int OpInfoLookup(void *DisInfo, uint64_t PC,
return 0; // Unknown data format
LLVMOpInfo1 *info = (LLVMOpInfo1*)TagBuf;
uint8_t bytes[Size];
for (int i=0; i<Size; ++i)
for (uint64_t i=0; i<Size; ++i)
SymTab->getMemoryObject().readByte(PC+Offset+i, &bytes[i]);
size_t pointer;
switch (Size) {
Expand Down

0 comments on commit e2500db

Please sign in to comment.