comctl32: Add missing break (Coverity)

Michael Stefaniuc mstefani at redhat.com
Wed Feb 23 10:56:18 CST 2011


Nikolay Sivov wrote:
> On 2/23/2011 19:28, Amine Khaldi wrote:
>> CIDs 1581 and 1583.
>> @@ -1852,6 +1852,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg,
>> WPARAM wParam, LPARAM lParam,
>>
>>          case VK_UP:
>>          step = -1;
>> +        break;
>>          case VK_DOWN:
>>          /* by default, step is 1 */
>>          oldItem = SendMessageW (infoPtr->hwndSelf, CB_GETCURSEL, 0, 0);
> This is wrong.
> 
>> @@ -2297,6 +2297,7 @@ static LRESULT
>> TOOLBAR_Cust_AvailDragListNotification(const CUSTDLG_INFO *custIn
>>              TOOLBAR_Cust_AddButton(custInfo, hwnd, nIndexFrom,
>> nIndexTo);
>>          }
>>      }
>> +    break;
>>      case DL_CANCELDRAG:
>>          /* Clear drag arrow */
>>          DrawInsert(hwnd, hwndList, -1);
> Why? Looks to me it's fine to clear on dropped case too. Coverity is a
> bit paranoid about missed breaks.
A missing break is not trivial to detect; especially if something is
done in a specific case. That's why Wine has a ton of "/* fall through
*/" annotations. IMHO they should be added here too .

bye
	michael



More information about the wine-devel mailing list