From: Paul Eggert Date: Sat, 1 Jul 2023 18:31:40 +0000 (-0700) Subject: maint: stop pacifying Parfait X-Git-Tag: v9.4~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d438486cb5da3c543b58facd8fd78a6326deacda;p=thirdparty%2Fcoreutils.git maint: stop pacifying Parfait * 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. --- diff --git a/src/fmt.c b/src/fmt.c index cfb4bcf7d5..ad7a9ce56a 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 37f9b14ffc..01de92f889 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)