dplayx: Make cbDelete{Groups,Player}Elem() static.

Francois Gouget fgouget at free.fr
Wed May 13 03:39:19 CDT 2009


Also enclose them in #if 0 since the only place that uses them is itself 
in an #if 0.
---

There's three other options:
 1) Remove this dead code altogether...
 2) Replace the #if 0 with an if (0) so that the function is 'used'
 3) Fix the code so it has neither #if 0 nor if (0) (which might be the 
    same as option 1, I have no idea)

 dlls/dplayx/dplay.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 1d57dba..6e44aa5 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -338,14 +338,14 @@ DPQ_DECL_DELETECB( cbDeleteElemFromHeap, LPVOID )
   HeapFree( GetProcessHeap(), 0, elem );
 }
 
+#if 0
 /* Function to delete the list of groups with this interface. Needs to
  * delete the group and player lists associated with this group as well
  * as the group data associated with this group. It should not delete
  * player data as that is shared with the top player list and will be
  * deleted with that.
  */
-DPQ_DECL_DELETECB( cbDeleteGroupsElem, lpGroupList );
-DPQ_DECL_DELETECB( cbDeleteGroupsElem, lpGroupList )
+static DPQ_DECL_DELETECB( cbDeleteGroupsElem, lpGroupList )
 {
   DPQ_DELETEQ( elem->lpGData->groups, groups,
                lpGroupList, cbDeleteElemFromHeap );
@@ -358,12 +358,12 @@ DPQ_DECL_DELETECB( cbDeleteGroupsElem, lpGroupList )
 /* Function to delete the list of players with this interface. Needs to
  * delete the player data for all players as well.
  */
-DPQ_DECL_DELETECB( cbDeletePlayerElem, lpPlayerList );
-DPQ_DECL_DELETECB( cbDeletePlayerElem, lpPlayerList )
+static DPQ_DECL_DELETECB( cbDeletePlayerElem, lpPlayerList )
 {
   HeapFree( GetProcessHeap(), 0, elem->lpPData );
   HeapFree( GetProcessHeap(), 0, elem );
 }
+#endif
 
 static BOOL DP_DestroyDirectPlay2( LPVOID lpDP )
 {
-- 
1.6.2.1




More information about the wine-patches mailing list