From d438486cb5da3c543b58facd8fd78a6326deacda Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 1 Jul 2023 11:31:40 -0700 Subject: [PATCH] maint: stop pacifying Parfait MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/fmt.c (get_paragraph): * src/stty.c (display_changed, display_all): Omit calls to ‘assume’ that are present only to pacify false positives by Parfait , which went in-house in 2012 and never came back. --- src/fmt.c | 4 ---- src/stty.c | 7 ------- 2 files changed, 11 deletions(-) diff --git a/src/fmt.c b/src/fmt.c index cfb4bcf7d..ad7a9ce56 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -616,10 +616,6 @@ get_paragraph (FILE *f) c = get_line (f, c); } - /* Tell static analysis tools that using word_limit[-1] is ok. - word_limit is guaranteed to have been incremented by get_line. */ - assume (word < word_limit); - (word_limit - 1)->period = (word_limit - 1)->final = true; next_char = c; return true; diff --git a/src/stty.c b/src/stty.c index 37f9b14ff..01de92f88 100644 --- a/src/stty.c +++ b/src/stty.c @@ -1979,12 +1979,6 @@ display_changed (struct termios *mode) bitsp = mode_type_flag (mode_info[i].type, mode); mask = mode_info[i].mask ? mode_info[i].mask : mode_info[i].bits; - - /* bitsp would be null only for "combination" modes, yet those - are filtered out above via the OMIT flag. Tell static analysis - tools that it's ok to dereference bitsp here. */ - assume (bitsp); - if ((*bitsp & mask) == mode_info[i].bits) { if (mode_info[i].flags & SANE_UNSET) @@ -2067,7 +2061,6 @@ display_all (struct termios *mode, char const *device_name) bitsp = mode_type_flag (mode_info[i].type, mode); mask = mode_info[i].mask ? mode_info[i].mask : mode_info[i].bits; - assume (bitsp); /* See the identical assertion and comment above. */ if ((*bitsp & mask) == mode_info[i].bits) wrapf ("%s", mode_info[i].name); else if (mode_info[i].flags & REV) -- 2.11.4.GIT