diff --git a/ldo.c b/ldo.c index 90f01ab2dd..070443e87d 100644 --- a/ldo.c +++ b/ldo.c @@ -57,7 +57,7 @@ /* C++ exceptions */ #define LUAI_THROW(L,c) throw(c) #define LUAI_TRY(L,c,a) \ - try { a } catch(...) { if ((c)->status == 0) (c)->status = -1; } + try { a } catch(lua_longjmp * const&) { if ((c)->status == 0) (c)->status = -1; } #define luai_jmpbuf int /* dummy variable */ #elif defined(LUA_USE_POSIX) /* }{ */ diff --git a/lobject.c b/lobject.c index 6c72144a97..1a13e76262 100644 --- a/lobject.c +++ b/lobject.c @@ -280,7 +280,7 @@ static const char *l_str2d (const char *s, lua_Number *result) { endptr = l_str2dloc(s, result, mode); /* try to convert */ if (endptr == NULL) { /* failed? may be a different locale */ char buff[L_MAXLENNUM + 1]; - char *pdot = strchr(s, '.'); + const char *pdot = strchr(s, '.'); if (strlen(s) > L_MAXLENNUM || pdot == NULL) return NULL; /* string too long or no dot; fail */ strcpy(buff, s); /* copy string to buffer */ diff --git a/lstrlib.c b/lstrlib.c index a18b6299df..3e80dc8e13 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -933,7 +933,7 @@ static void addquoted (luaL_Buffer *b, const char *s, size_t len) { static void checkdp (char *buff, int nb) { if (memchr(buff, '.', nb) == NULL) { /* no dot? */ char point = lua_getlocaledecpoint(); /* try locale point */ - char *ppoint = memchr(buff, point, nb); + char *ppoint = (char*)memchr(buff, point, nb); if (ppoint) *ppoint = '.'; /* change it to a dot */ } }