comctl32: Remove unused variables (1 of 2)
Andrew Talbot
andrew.talbot at talbotville.com
Sat Apr 12 12:31:43 CDT 2008
Changelog:
comctl32: Remove unused variables.
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index a98243d..e79831d 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -530,13 +530,11 @@ static UINT COMBOEX_GetListboxText(COMBOEX_INFO *infoPtr, int n, LPWSTR buf)
static INT COMBOEX_DeleteItem (COMBOEX_INFO *infoPtr, INT index)
{
- CBE_ITEMDATA const *item;
-
TRACE("(index=%d)\n", index);
/* if item number requested does not exist then return failure */
if ((index >= infoPtr->nb_items) || (index < 0)) return CB_ERR;
- if (!(item = COMBOEX_FindItem(infoPtr, index))) return CB_ERR;
+ if (!COMBOEX_FindItem(infoPtr, index)) return CB_ERR;
/* doing this will result in WM_DELETEITEM being issued */
SendMessageW (infoPtr->hwndCombo, CB_DELETESTRING, (WPARAM)index, 0);
diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c
index 418e87c..b4180a1 100644
--- a/dlls/comctl32/comctl32undoc.c
+++ b/dlls/comctl32/comctl32undoc.c
@@ -858,7 +858,6 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
const WINEMRULIST *mp = (LPWINEMRULIST) hList;
LPWINEMRUITEM witem;
INT desired, datasize;
- DWORD lenA;
if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
if (nItemPos >= mp->cursize) return -1;
@@ -870,8 +869,8 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
datasize = min( witem->size, nBufferSize );
memcpy( lpBuffer, &witem->datastart, datasize);
} else {
- lenA = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
- NULL, 0, NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
+ NULL, 0, NULL, NULL);
datasize = min( witem->size, nBufferSize );
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
lpBuffer, datasize, NULL, NULL);
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index abe1470..ab819e6 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -9968,10 +9968,9 @@ static LRESULT LISTVIEW_Command(const LISTVIEW_INFO *infoPtr, WPARAM wParam, LPA
HFONT hFont, hOldFont = 0;
RECT rect;
SIZE sz;
- int len;
if (!infoPtr->hwndEdit || !hdc) return 0;
- len = GetWindowTextW(infoPtr->hwndEdit, buffer, sizeof(buffer)/sizeof(buffer[0]));
+ GetWindowTextW(infoPtr->hwndEdit, buffer, sizeof(buffer)/sizeof(buffer[0]));
GetWindowRect(infoPtr->hwndEdit, &rect);
/* Select font to get the right dimension of the string */
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 1c325de..a9647cd 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -442,7 +442,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
RECT *days=&dayrect;
RECT rtoday;
int i, j, m, mask, day, firstDay, weeknum, weeknum1,prevMonth;
- int textHeight = infoPtr->textHeight, textWidth = infoPtr->textWidth;
+ int textHeight = infoPtr->textHeight;
SIZE size;
HBRUSH hbr;
HFONT currentFont;
@@ -659,13 +659,11 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
* date if necessary */
if(!(dwStyle & MCS_NOTODAY)) {
- int offset = 0;
if(!(dwStyle & MCS_NOTODAYCIRCLE)) {
/*day is the number of days from nextmonth we put on the calendar */
MONTHCAL_CircleDay(infoPtr, hdc,
day+MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear),
infoPtr->currentMonth);
- offset+=textWidth;
}
if (!LoadStringW(COMCTL32_hModule,IDM_TODAY,buf1,countof(buf1)))
{
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 033b474..638acea 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -2848,7 +2848,6 @@ REBAR_Create (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
LPCREATESTRUCTW cs = (LPCREATESTRUCTW) lParam;
RECT wnrc1, clrc1;
- HTHEME theme;
if (TRACE_ON(rebar)) {
GetWindowRect(infoPtr->hwndSelf, &wnrc1);
@@ -2859,8 +2858,8 @@ REBAR_Create (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
}
TRACE("created!\n");
-
- if ((theme = OpenThemeData (infoPtr->hwndSelf, themeClass)))
+
+ if (OpenThemeData (infoPtr->hwndSelf, themeClass))
{
/* native seems to clear WS_BORDER when themed */
infoPtr->dwStyle &= ~WS_BORDER;
More information about the wine-patches
mailing list