From c5efd8a1e1b4cb0fe4eae4fe5a831f7c87d4b995 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Sat, 17 Sep 2016 13:32:33 +0000 Subject: [PATCH] (edit_move_block_to_left): cleanup -Wunsafe-loop-optimizations. edit.c: In function 'edit_move_block_to_left': edit.c:1652:13: warning: cannot optimize possibly infinite loops [-Wunsafe-loop-optimizations] for (i = 1; i <= del_tab_width; i++) ^~~ Signed-off-by: Andreas Mohr Signed-off-by: Andrew Borodin --- src/editor/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/edit.c b/src/editor/edit.c index e70945d94..08700cb99 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -1649,7 +1649,7 @@ edit_move_block_to_left (WEdit * edit) if (next_char == '\t') edit_delete (edit, TRUE); else if (next_char == ' ') - for (i = 1; i <= del_tab_width; i++) + for (i = 0; i < del_tab_width; i++) { if (next_char == ' ') edit_delete (edit, TRUE);