diff options
| author | Mike Pall <mike> | 2016-03-22 20:40:41 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2016-03-22 20:40:41 +0100 |
| commit | ddadbe80997bc1ebe12e986298d26bef07811e62 (patch) | |
| tree | 9d00853b7757be842c6a5c775fb153120a7556b5 /src/host | |
| parent | db1b399af134e715b8ba9a0e4ad9cbafbe06ecb1 (diff) | |
| download | luajit-ddadbe80997bc1ebe12e986298d26bef07811e62.tar.gz luajit-ddadbe80997bc1ebe12e986298d26bef07811e62.tar.bz2 luajit-ddadbe80997bc1ebe12e986298d26bef07811e62.zip | |
Fix compiler warnings.
Thanks to Demetri Obenour.
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/buildvm_fold.c | 2 | ||||
| -rw-r--r-- | src/host/genminilua.lua | 1 | ||||
| -rw-r--r-- | src/host/minilua.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/host/buildvm_fold.c b/src/host/buildvm_fold.c index eec1af1c..e87a0af3 100644 --- a/src/host/buildvm_fold.c +++ b/src/host/buildvm_fold.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | /* Context for the folding hash table generator. */ | 10 | /* Context for the folding hash table generator. */ |
| 11 | static int lineno; | 11 | static int lineno; |
| 12 | static int funcidx; | 12 | static uint32_t funcidx; |
| 13 | static uint32_t foldkeys[BUILD_MAX_FOLD]; | 13 | static uint32_t foldkeys[BUILD_MAX_FOLD]; |
| 14 | static uint32_t nkeys; | 14 | static uint32_t nkeys; |
| 15 | 15 | ||
diff --git a/src/host/genminilua.lua b/src/host/genminilua.lua index 0a4690c1..e9a68297 100644 --- a/src/host/genminilua.lua +++ b/src/host/genminilua.lua | |||
| @@ -300,6 +300,7 @@ local function strip_unused3(src) | |||
| 300 | src = gsub(src, "if%([^\n]*hookmask[^\n]*&&\n[^\n]*%b{}\n", "") | 300 | src = gsub(src, "if%([^\n]*hookmask[^\n]*&&\n[^\n]*%b{}\n", "") |
| 301 | src = gsub(src, "(twoto%b()%()", "%1(size_t)") | 301 | src = gsub(src, "(twoto%b()%()", "%1(size_t)") |
| 302 | src = gsub(src, "i<sizenode", "i<(int)sizenode") | 302 | src = gsub(src, "i<sizenode", "i<(int)sizenode") |
| 303 | src = gsub(src, "cast%(unsigned int,key%-1%)", "cast(unsigned int,key)-1") | ||
| 303 | return gsub(src, "\n\n+", "\n") | 304 | return gsub(src, "\n\n+", "\n") |
| 304 | end | 305 | end |
| 305 | 306 | ||
diff --git a/src/host/minilua.c b/src/host/minilua.c index aee192a7..79150286 100644 --- a/src/host/minilua.c +++ b/src/host/minilua.c | |||
| @@ -1606,7 +1606,7 @@ luaC_barriert(L,t,key); | |||
| 1606 | return gval(mp); | 1606 | return gval(mp); |
| 1607 | } | 1607 | } |
| 1608 | static const TValue*luaH_getnum(Table*t,int key){ | 1608 | static const TValue*luaH_getnum(Table*t,int key){ |
| 1609 | if(cast(unsigned int,key-1)<cast(unsigned int,t->sizearray)) | 1609 | if(cast(unsigned int,key)-1<cast(unsigned int,t->sizearray)) |
| 1610 | return&t->array[key-1]; | 1610 | return&t->array[key-1]; |
| 1611 | else{ | 1611 | else{ |
| 1612 | lua_Number nk=cast_num(key); | 1612 | lua_Number nk=cast_num(key); |
