From ca13be9af784b7288d3a07d9b5bccb329086e885 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 16 Aug 2019 09:51:54 -0300 Subject: Supressed errors in '__close' generate warnings --- ltests.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index fd55fc31..b460d018 100644 --- a/ltests.c +++ b/ltests.c @@ -95,15 +95,15 @@ static void warnf (void *ud, const char *msg, int tocont) { if (!lasttocont && !tocont && *msg == '@') { /* control message? */ if (buff[0] != '\0') badexit("Control warning during warning: %s\naborting...\n", msg); - if (strcmp(msg + 1, "off") == 0) + if (strcmp(msg, "@off") == 0) onoff = 0; - else if (strcmp(msg + 1, "on") == 0) + else if (strcmp(msg, "@on") == 0) onoff = 1; - else if (strcmp(msg + 1, "normal") == 0) + else if (strcmp(msg, "@normal") == 0) mode = 0; - else if (strcmp(msg + 1, "allow") == 0) + else if (strcmp(msg, "@allow") == 0) mode = 1; - else if (strcmp(msg + 1, "store") == 0) + else if (strcmp(msg, "@store") == 0) mode = 2; else badexit("Invalid control warning in test mode: %s\naborting...\n", msg); -- cgit v1.2.3-55-g6feb