Dominique Pellé wrote:

> I compiled vim-7.4.1411 with gcc-6 (a snapshot, as it's not released
> yet).  gcc-6 gave warnings in farsi.c:
> 
> farsi.c: In function ‘fkmap’:
> farsi.c:767:7: warning: statement is indented as if it were guarded
> by... [-Wmisleading-indentation]
>        chg_c_toX_orX ();
>        ^~~~~~~~~~~~~
> farsi.c:764:3: note: ...this ‘if’ clause, but it is not
>    if (!p_ri)
>    ^~
> farsi.c:1246:7: warning: statement is indented as if it were guarded
> by... [-Wmisleading-indentation]
>        tempc = LA;
>        ^~~~~
> farsi.c:1243:3: note: ...this ‘if’ clause, but it is not
>    if (!p_ri)
>    ^~
> 
> I could not tell whether the warnings happen because of:
> - bad indentation (in which case warning is harmless)
> - or because of missing curly braces in 'if' blocks,
>   in which case there is a bug in the code.
> 
> In doubt, I preferred to not fix it, as silencing the warning
> wrongly would do more harm than good.

I think we can assume the code was working, changing the indent appears
to be the best solution.  I assume this was caused by copy&paste.

If the problem was missing curly braces, then nobody noticed for a long
time so it might not matter...

-- 
The Law of VIM:
For each member b of the possible behaviour space B of program P, there exists
a finite time t before which at least one user u in the total user space U of
program P will request b becomes a member of the allowed behaviour space B'
(B' <= B).
In other words: Sooner or later everyone wants everything as an option.
                                        -- Vince Negri

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui