Unused code/variables
Francois Gouget
fgouget at free.fr
Mon Jan 21 02:06:20 CST 2002
Changelog
* dlls/ddraw/d3ddevice/mesa.c,
dlls/quartz/audren.c,
dlls/quartz/sample.c,
dlls/wsock32/socket.c,
tools/winedump/pe.c
Comment out/ifdef out unused code and variables
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
The greatest programming project of all took six days; on the seventh day the
programmer rested. We've been trying to debug the *&^%$#@ thing ever since.
Moral: design before you implement.
-------------- next part --------------
Index: dlls/ddraw/d3ddevice/mesa.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/d3ddevice/mesa.c,v
retrieving revision 1.15
diff -u -r1.15 mesa.c
--- dlls/ddraw/d3ddevice/mesa.c 2001/10/14 16:18:52 1.15
+++ dlls/ddraw/d3ddevice/mesa.c 2002/01/19 19:26:08
@@ -815,8 +815,10 @@
{
if (!memcmp(&IID_D3DDEVICE_OpenGL,rguid,sizeof(IID_D3DDEVICE_OpenGL))) {
mesa_d3dd_private *odev;
+#if 0 /* See below */
int attributeList[]={ GLX_RGBA, GLX_DEPTH_SIZE, 16, GLX_DOUBLEBUFFER, None };
XVisualInfo *xvis;
+#endif
*device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DDeviceImpl));
(*device)->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dd_private));
Index: dlls/quartz/audren.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/audren.c,v
retrieving revision 1.4
diff -u -r1.4 audren.c
--- dlls/quartz/audren.c 2001/10/22 19:03:26 1.4
+++ dlls/quartz/audren.c 2002/01/19 19:26:10
@@ -195,6 +195,9 @@
return hr;
}
+#if 0
+/* FIXME: Not used for now */
+
static HRESULT CAudioRendererImpl_waveOutPause( CAudioRendererImpl* This )
{
if ( !This->m_fWaveOutInit )
@@ -212,6 +215,7 @@
return QUARTZ_HRESULT_From_MMRESULT( waveOutRestart(
This->m_hWaveOut ) );
}
+#endif
static
WAVEHDR* CAudioRendererImpl_waveOutGetBuffer(
@@ -296,6 +300,9 @@
return S_OK;
}
+#if 0
+/* FIXME: Not used for now */
+
static
HRESULT CAudioRendererImpl_waveOutGetVolume(
CAudioRendererImpl* This,
@@ -337,6 +344,7 @@
This->m_hWaveOut, dwVol );
return QUARTZ_HRESULT_From_MMRESULT( mr );
}
+#endif
/***************************************************************************
*
@@ -348,7 +356,7 @@
static HRESULT CAudioRendererImpl_OnActive( CBaseFilterImpl* pImpl )
{
CAudioRendererImpl_THIS(pImpl,basefilter);
- HRESULT hr;
+ /* HRESULT hr; */
FIXME( "(%p)\n", This );
Index: dlls/quartz/sample.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/sample.c,v
retrieving revision 1.6
diff -u -r1.6 sample.c
--- dlls/quartz/sample.c 2001/10/22 19:03:26 1.6
+++ dlls/quartz/sample.c 2002/01/21 06:15:55
@@ -32,13 +32,13 @@
IMediaSample* pSample,
AM_SAMPLE2_PROPERTIES* pProp )
{
+#if 0 /* not yet */
HRESULT hr;
AM_SAMPLE2_PROPERTIES prop;
IMediaSample2* pSample2 = NULL;
ZeroMemory( &prop, sizeof(AM_SAMPLE2_PROPERTIES) );
-#if 0 /* not yet */
hr = IMediaSample_QueryInterface( pSample, &IID_IMediaSample2, (void**)&pSample2 );
if ( hr == S_OK )
{
@@ -82,7 +82,9 @@
{
HRESULT hr;
AM_SAMPLE2_PROPERTIES prop;
+#if 0 /* not yet */
IMediaSample2* pSample2 = NULL;
+#endif
memcpy( &prop, pProp, sizeof(AM_SAMPLE2_PROPERTIES) );
prop.cbData = sizeof(AM_SAMPLE2_PROPERTIES);
Index: dlls/wsock32/socket.c
===================================================================
RCS file: /home/wine/wine/dlls/wsock32/socket.c,v
retrieving revision 1.18
diff -u -r1.18 socket.c
--- dlls/wsock32/socket.c 2001/12/14 22:45:42 1.18
+++ dlls/wsock32/socket.c 2002/01/19 19:26:12
@@ -200,31 +200,33 @@
*/
IFEntry *IntInfo = (IFEntry *) pResponseInfo;
char ifName[512];
+#if defined(SIOCGIFHWADDR) || defined(SIOCGENADDR)
struct ifreq ifInfo;
+#endif
SOCKET sock;
-
+
if (!WSCNTL_GetInterfaceName(pcommand->toi_entity.tei_instance, ifName))
{
ERR ("Unable to parse /proc filesystem!\n");
return (-1);
}
-
+
/* Get a socket so that we can use ioctl */
if ( (sock = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET)
{
ERR ("Error creating socket!\n");
return (-1);
}
-
+
/* 0 out return structure first */
memset (IntInfo, 0, sizeof(IFEntry));
-
+
/* Interface ID */
IntInfo->if_index = pcommand->toi_entity.tei_instance;
-
+
/* MAC Address - Let's try to do this in a cross-platform way... */
- #if defined(SIOCGIFHWADDR) /* Linux */
+#if defined(SIOCGIFHWADDR) /* Linux */
strcpy(ifInfo.ifr_name, ifName);
if (ioctlsocket(sock, SIOCGIFHWADDR, (ULONG*)&ifInfo) < 0)
{
@@ -238,7 +240,7 @@
memcpy(IntInfo->if_physaddr, ifInfo.ifr_hwaddr.sa_data, 6);
IntInfo->if_physaddrlen=6;
}
- #elif defined(SIOCGENADDR) /* Solaris */
+#elif defined(SIOCGENADDR) /* Solaris */
if (ioctlsocket(sock, SIOCGENADDR, (ULONG*)&ifInfo) < 0)
{
ERR ("Error obtaining MAC Address!\n");
@@ -248,19 +250,19 @@
else
{
/* FIXME: Is it correct to assume size of 6? */
- memcpy(IntInfo->if_physaddr, ifInfo.ifr_enaddr, 6);
+ memcpy(IntInfo->if_physaddr, ifInfo.ifr_enaddr, 6);
IntInfo->if_physaddrlen=6;
}
- #else
+#else
memset (IntInfo->if_physaddr, 0, 6);
ERR ("Unable to determine MAC Address on your platform!\n");
- #endif
+#endif
-
+
/* Interface name and length */
strcpy (IntInfo->if_descr, ifName);
IntInfo->if_descrlen= strlen (IntInfo->if_descr);
-
+
/* Obtain bytes transmitted/received for interface */
if ( (WSCNTL_GetTransRecvStat(pcommand->toi_entity.tei_instance,
&IntInfo->if_inoctets, &IntInfo->if_outoctets)) < 0)
@@ -269,11 +271,11 @@
closesocket(sock);
return (-1);
}
-
-
+
+
/* FIXME: How should the below be properly calculated? ******************/
IntInfo->if_type = 0x6; /* Ethernet (?) */
- IntInfo->if_speed = 1000000; /* Speed of interface (bits per second?) */
+ IntInfo->if_speed = 1000000; /* Speed of interface (bits per second?) */
/************************************************************************/
closesocket(sock);
Index: tools/winedump/pe.c
===================================================================
RCS file: /home/wine/wine/tools/winedump/pe.c,v
retrieving revision 1.7
diff -u -r1.7 pe.c
--- tools/winedump/pe.c 2002/01/06 19:09:17 1.7
+++ tools/winedump/pe.c 2002/01/21 05:41:07
@@ -875,6 +875,7 @@
*
* Free resources used by DLL
*/
+/* FIXME: Not used yet
static void dll_close (void)
{
dll_symbol* ds;
@@ -887,6 +888,7 @@
free (dll_symbols);
dll_symbols = NULL;
}
+*/
static void do_grab_sym(void)
{
More information about the wine-patches
mailing list