Supressed errors in '__close' generate warnings

This commit is contained in:
Roberto Ierusalimschy
2019-08-16 09:51:54 -03:00
parent a1d8eb2743
commit ca13be9af7
10 changed files with 166 additions and 45 deletions

View File

@@ -1010,9 +1010,9 @@ static int panic (lua_State *L) {
static void warnf (void *ud, const char *message, int tocont) {
int *warnstate = (int *)ud;
if (*warnstate != 2 && !tocont && *message == '@') { /* control message? */
if (strcmp(message + 1, "off") == 0)
if (strcmp(message, "@off") == 0)
*warnstate = 0;
else if (strcmp(message + 1, "on") == 0)
else if (strcmp(message, "@on") == 0)
*warnstate = 1;
return;
}