diff options
author | Kayo Hamid <kayo.hamid@gekkolinux.com.br> | 2011-04-18 21:22:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-04-18 21:31:57 +0100 |
commit | bdb6e244626fb922b916aae8ba02941c9123a2cf (patch) | |
tree | a7fe7f25055bbcfea40f38a644cd8c37534ba81e /vcl | |
parent | 128ebebd60a1a170cf74011b49f9ad35f010e8ce (diff) |
fixes for some cppcheck warnings
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 12228f31e834..273a19dfd546 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -4750,14 +4750,12 @@ static int ImplHandleMinMax( HWND hWnd, LPARAM lParam ) // if bByPosition is FALSE then nPos denotes a menu id instead of a position static WinSalMenuItem* ImplGetSalMenuItem( HMENU hMenu, UINT nPos, sal_Bool bByPosition=TRUE ) { - DWORD err=0; - MENUITEMINFOW mi; memset(&mi, 0, sizeof(mi)); mi.cbSize = sizeof( mi ); mi.fMask = MIIM_DATA; if( !GetMenuItemInfoW( hMenu, nPos, bByPosition, &mi) ) - err = GetLastError(); + DWORD err = GetLastError(); return (WinSalMenuItem *) mi.dwItemData; } @@ -4765,8 +4763,6 @@ static WinSalMenuItem* ImplGetSalMenuItem( HMENU hMenu, UINT nPos, sal_Bool bByP // returns the index of the currently selected item if any or -1 static int ImplGetSelectedIndex( HMENU hMenu ) { - DWORD err=0; - MENUITEMINFOW mi; memset(&mi, 0, sizeof(mi)); mi.cbSize = sizeof( mi ); @@ -4777,7 +4773,7 @@ static int ImplGetSelectedIndex( HMENU hMenu ) for(int i=0; i<n; i++ ) { if( !GetMenuItemInfoW( hMenu, i, TRUE, &mi) ) - err = GetLastError(); + DWORD err = GetLastError(); else { if( mi.fState & MFS_HILITE ) |