From 8f4db39514be558da3a1dcd65a2f6ab05d979e56 Mon Sep 17 00:00:00 2001 From: "Sijmen J. Mulder" Date: Thu, 10 Aug 2023 13:22:12 +0200 Subject: Address 'misleading indentation' warning $ uname -a OpenBSD openbsd.joosts-fw13 7.3 GENERIC.MP#1125 amd64 $ cc --version OpenBSD clang version 13.0.0 Target: amd64-unknown-openbsd7.3 Thread model: posix InstalledDir: /usr/bin lex.c:270:25: warning: misleading indentation; statement is not part of the previous 'while' [-Wmisleading-indentation] if (isalpha(*p) || *p == '_') { ^ lex.c:268:21: note: previous statement is here while (isdigit(*++p)) ^ --- src/lex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lex.c b/src/lex.c index 5ff8eda..2c09407 100644 --- a/src/lex.c +++ b/src/lex.c @@ -267,11 +267,11 @@ int yylex() { } else if (*p == 'e' || *p == 'E') { while (isdigit(*++p)) ; - if (isalpha(*p) || *p == '_') { - linelim = p - line; - return (yylex()); - } else - ret = FNUMBER; + if (isalpha(*p) || *p == '_') { + linelim = p - line; + return (yylex()); + } else + ret = FNUMBER; } else if (isalpha(*p) || *p == '_') { linelim = p - line; return (yylex()); -- cgit v1.2.3