Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 68 by [email protected]: duplicate branches for if and else in src/gui_xmebw.c
http://code.google.com/p/vim/issues/detail?id=68

cppcheck static analyzer gives this warning:

[gui_xmebw.c:381] -> [gui_xmebw.c:378]: (style) Found duplicate branches for if
and else.

Code looks like this:

src/gui_xmebw.c:

 286     static void
 287 set_pixmap(XmEnhancedButtonWidget eb)
 ...
 378     if (eb->enhancedbutton.label_location == (int)XmTOP
 379             || eb->enhancedbutton.label_location == (int)XmBOTTOM)
 380         shift = eb->primitive.shadow_thickness / 2;
 381     else
 382         shift = eb->primitive.shadow_thickness / 2;

Surely something else was intended here, or the if statement
is useless since both branches do the exact same thing.

I could not tell what was intended.


--
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

Raspunde prin e-mail lui