diff options
author | Mike Pall <mike> | 2013-07-18 00:39:23 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-07-18 00:39:23 +0200 |
commit | 1ddf5689b5cb84b0fc500c2d0e32fadda7e8838b (patch) | |
tree | b990f3a092724ab571f574449c42b40e2a494bc8 | |
parent | dd44018d6629cd43366ae47a0a227ffbf63722f2 (diff) | |
download | luajit-1ddf5689b5cb84b0fc500c2d0e32fadda7e8838b.tar.gz luajit-1ddf5689b5cb84b0fc500c2d0e32fadda7e8838b.tar.bz2 luajit-1ddf5689b5cb84b0fc500c2d0e32fadda7e8838b.zip |
Fix compiler warning.
-rw-r--r-- | src/lj_debug.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lj_debug.c b/src/lj_debug.c index 54f7db74..24efd2ff 100644 --- a/src/lj_debug.c +++ b/src/lj_debug.c | |||
@@ -137,21 +137,22 @@ static BCLine debug_frameline(lua_State *L, GCfunc *fn, cTValue *nextframe) | |||
137 | /* Get name of a local variable from slot number and PC. */ | 137 | /* Get name of a local variable from slot number and PC. */ |
138 | static const char *debug_varname(const GCproto *pt, BCPos pc, BCReg slot) | 138 | static const char *debug_varname(const GCproto *pt, BCPos pc, BCReg slot) |
139 | { | 139 | { |
140 | const uint8_t *p = proto_varinfo(pt); | 140 | const char *p = (const char *)proto_varinfo(pt); |
141 | if (p) { | 141 | if (p) { |
142 | BCPos lastpc = 0; | 142 | BCPos lastpc = 0; |
143 | for (;;) { | 143 | for (;;) { |
144 | const char *name = (const char *)p; | 144 | const char *name = p; |
145 | uint32_t vn = *p++; | 145 | uint32_t vn = *(const uint8_t *)p; |
146 | BCPos startpc, endpc; | 146 | BCPos startpc, endpc; |
147 | if (vn < VARNAME__MAX) { | 147 | if (vn < VARNAME__MAX) { |
148 | if (vn == VARNAME_END) break; /* End of varinfo. */ | 148 | if (vn == VARNAME_END) break; /* End of varinfo. */ |
149 | } else { | 149 | } else { |
150 | while (*p++) ; /* Skip over variable name string. */ | 150 | do { p++; } while (*(const uint8_t *)p); /* Skip over variable name. */ |
151 | } | 151 | } |
152 | lastpc = startpc = lastpc + lj_buf_ruleb128((const char **)&p); | 152 | p++; |
153 | lastpc = startpc = lastpc + lj_buf_ruleb128(&p); | ||
153 | if (startpc > pc) break; | 154 | if (startpc > pc) break; |
154 | endpc = startpc + lj_buf_ruleb128((const char **)&p); | 155 | endpc = startpc + lj_buf_ruleb128(&p); |
155 | if (pc < endpc && slot-- == 0) { | 156 | if (pc < endpc && slot-- == 0) { |
156 | if (vn < VARNAME__MAX) { | 157 | if (vn < VARNAME__MAX) { |
157 | #define VARNAMESTR(name, str) str "\0" | 158 | #define VARNAMESTR(name, str) str "\0" |