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
<https://labs.oracle.com/pls/apex/f?p=94065:12:17236785746387:13>,
which went in-house in 2012 and never came back.
This commit is contained in:
Paul Eggert committed 2023-07-01 11:51:16 -07:00
1 parent a44b866b11
commit d438486cb5
2 files changed
-11

No files matched your search

-4
View File
@@ -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;
-7
View File
@@ -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)