Browse Source

Fix some compiler warnings.

Mike Pall 15 years ago
parent
commit
0a3329c581
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/lj_parse.c

+ 5 - 3
src/lj_parse.c

@@ -620,10 +620,11 @@ static BCPos bcemit_jmp(FuncState *fs)
 {
   BCPos jpc = fs->jpc;
   BCPos j = fs->pc - 1;
+  BCIns *ip = &fs->bcbase[j].ins;
   fs->jpc = NO_JMP;
   if ((int32_t)j >= (int32_t)fs->lasttarget &&
-      bc_op(fs->bcbase[j].ins) == BC_UCLO)
-    setbc_j(&fs->bcbase[j].ins, NO_JMP);
+      bc_op(*ip) == BC_UCLO)
+    setbc_j(ip, NO_JMP);
   else
     j = bcemit_AJ(fs, BC_JMP, fs->freereg, NO_JMP);
   jmp_append(fs, &j, jpc);
@@ -1378,10 +1379,11 @@ static void expr_table(LexState *ls, ExpDesc *e)
     e->k = VNONRELOC;  /* May have been changed by expr_index. */
   }
   if (!t) {  /* Construct TNEW RD: hhhhhaaaaaaaaaaa. */
+    BCIns *ip = &fs->bcbase[pc].ins;
     if (!needarr) narr = 0;
     else if (narr < 3) narr = 3;
     else if (narr > 0x7ff) narr = 0x7ff;
-    setbc_d(&fs->bcbase[pc].ins, (uint32_t)narr|(hsize2hbits(nhash)<<11));
+    setbc_d(ip, (uint32_t)narr|(hsize2hbits(nhash)<<11));
   }
 }