From 5709c81fe0a7335803a367e5335d22cc2a11c3c0 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Wed, 2 Nov 2016 14:22:34 -0700 Subject: [PATCH] lint: empty while statement --- src/input.cpp | 5 +++-- src/reader.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index c35ee82c3..a593a282d 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -607,8 +607,9 @@ wint_t input_readch(bool allow_commands) { if (input_function_status) { return input_readch(); } - while ((c = input_common_readch(0)) && c >= R_MIN && c <= R_MAX) { - // do nothing + c = input_common_readch(0); + while (c >= R_MIN && c <= R_MAX) { + c = input_common_readch(0); } input_common_next_ch(c); return input_readch(); diff --git a/src/reader.cpp b/src/reader.cpp index e7e046236..dc610a8c7 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -2373,7 +2373,7 @@ static bool text_ends_in_comment(const wcstring &text) { tokenizer_t tok(text.c_str(), TOK_ACCEPT_UNFINISHED | TOK_SHOW_COMMENTS | TOK_SQUASH_ERRORS); tok_t token; while (tok.next(&token)) { - // pass + ; // pass } return token.type == TOK_COMMENT; }