PATCH: squash three warnings in dlls/shell32/brsfolder.c

Gerald Pfeifer gerald at pfeifer.com
Mon Jul 10 05:26:17 CDT 2006


A few weeks ago, on SUSE Linux 10.1 with GCC 4.1, I started getting
the following warnings:

  brsfolder.c:591: warning: value computed is not used
  brsfolder.c:599: warning: value computed is not used
  brsfolder.c:626: warning: value computed is not used

The patch below addresses this one way -- by explicitly telling the
compiler we are not interested in the return value.

Gerald

ChangeLog:
Avoid compiler warnings by explicitly stating when we are not
interested in the results of function calls.

Index: dlls/shell32/brsfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/brsfolder.c,v
retrieving revision 1.74
diff -u -r1.74 brsfolder.c
--- brsfolder.c	26 Jun 2006 12:14:53 -0000	1.74
+++ brsfolder.c	10 Jul 2006 10:22:31 -0000
@@ -588,7 +588,7 @@
     while (item.hItem && !_ILIsEmpty(pidlCurrent)) {
         LPTV_ITEMDATA pItemData;
 
-        TreeView_GetItemW(info->hwndTreeView, &item);
+        (void)TreeView_GetItemW(info->hwndTreeView, &item);
         pItemData = (LPTV_ITEMDATA)item.lParam;
 
         if (_ILIsEqualSimple(pItemData->lpi, pidlCurrent)) {
@@ -596,7 +596,7 @@
             if (!_ILIsEmpty(pidlCurrent)) {
                 /* Only expand current node and move on to it's first child,
                  * if we didn't already reach the last SHITEMID */
-                TreeView_Expand(info->hwndTreeView, item.hItem, TVE_EXPAND);
+                (void)TreeView_Expand(info->hwndTreeView, item.hItem, TVE_EXPAND);
                 item.hItem = TreeView_GetChild(info->hwndTreeView, item.hItem);
             }
         } else {
@@ -623,7 +623,7 @@
 
     bResult = BrsFolder_OnSetExpanded(info, selection, is_str, &hItem);
     if (bResult)
-        TreeView_Select(info->hwndTreeView, hItem, TVGN_CARET);
+        (void)TreeView_Select(info->hwndTreeView, hItem, TVGN_CARET);
     return bResult;
 }
 



More information about the wine-patches mailing list