mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
maint: unexpand: remove dead store
The assign to next_tab_column in the backspace branch is never read; in fact it's always written and then read solely inside the blank branch. Move the declaration of 'next_tab_column' down into the blank branch, and remove its assignment in the backspace branch. Spotted by the 'infer' static checker. * src/unexpand.c (unexpand): Remove dead store of next_tab_column.
This commit is contained in:
1 parent
9240ef6700
commit
eaac58cffa
1 file changed
+4
-6
+4
-6
@@ -140,9 +140,6 @@ unexpand (void)
|
||||
/* Column of next input character. */
|
||||
colno column = 0;
|
||||
|
||||
/* Column the next input tab stop is on. */
|
||||
colno next_tab_column = 0;
|
||||
|
||||
/* Index in TAB_LIST of next tab stop to examine. */
|
||||
idx_t tab_index = 0;
|
||||
|
||||
@@ -173,8 +170,10 @@ unexpand (void)
|
||||
{
|
||||
bool last_tab;
|
||||
|
||||
next_tab_column = get_next_tab_column (column, &tab_index,
|
||||
&last_tab);
|
||||
/* Column the next input tab stop is on. */
|
||||
colno next_tab_column = get_next_tab_column (column,
|
||||
&tab_index,
|
||||
&last_tab);
|
||||
|
||||
if (last_tab)
|
||||
convert = false;
|
||||
@@ -217,7 +216,6 @@ unexpand (void)
|
||||
/* Go back one column, and force recalculation of the
|
||||
next tab stop. */
|
||||
column -= !!column;
|
||||
next_tab_column = column;
|
||||
tab_index -= !!tab_index;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user