Fix assorted warnings

Francois Gouget fgouget at free.fr
Sun Jan 27 02:15:36 CST 2002



Changelog:

 * programs/control/control.spec,
   programs/regtest/regtest.c,
   programs/winetest/wine.xs,
   programs/winetest/winetest.c

   Fix assorted warnings:
   control does not seem to use shell32. So there is no need to include it
   malloc.h is obsolete and stdlib.h should be used instead
   config.h should be included first (if at all)
   Fix return of convert_value
   envp works fine, there is no need for environ

   (actually environ was an undefined symbol)


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
  Any sufficiently advanced Operating System is indistinguishable from Linux
-------------- next part --------------
Index: programs/control/control.spec
===================================================================
RCS file: /home/wine/wine/programs/control/control.spec,v
retrieving revision 1.2
diff -u -r1.2 control.spec
--- programs/control/control.spec	2000/11/09 20:41:13	1.2
+++ programs/control/control.spec	2002/01/27 05:27:02
@@ -2,7 +2,6 @@
 mode	guiexe
 type	win32
 
-import	shell32.dll
 import	user32.dll
 import	kernel32.dll
 import	ntdll.dll
Index: programs/regtest/regtest.c
===================================================================
RCS file: /home/wine/wine/programs/regtest/regtest.c,v
retrieving revision 1.5
diff -u -r1.5 regtest.c
--- programs/regtest/regtest.c	2000/04/16 20:27:35	1.5
+++ programs/regtest/regtest.c	2002/01/27 05:27:02
@@ -14,7 +14,7 @@
  */
 
 #include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <windows.h>
 #include <winreg.h>
 #include <winerror.h>
Index: programs/winetest/wine.xs
===================================================================
RCS file: /home/wine/wine/programs/winetest/wine.xs,v
retrieving revision 1.5
diff -u -r1.5 wine.xs
--- programs/winetest/wine.xs	2002/01/21 17:41:52	1.5
+++ programs/winetest/wine.xs	2002/01/27 05:27:02
@@ -1,14 +1,15 @@
-/* -*-C-*- --------------------------------------------------------------------
-| Module:      wine.xs                                                         |
-| ---------------------------------------------------------------------------- |
-| Purpose:     Perl gateway to wine API calls                                  |
-|                                                                              |
-------------------------------------------------------------------------------*/
+/* -*-C-*- -------------------------------------------------------------
+| Module:      wine.xs                                                 |
+| -------------------------------------------------------------------- |
+| Purpose:     Perl gateway to wine API calls                          |
+|                                                                      |
+----------------------------------------------------------------------*/
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <string.h>
 
-#include "config.h"
 #include "windef.h"
 
 #include <EXTERN.h>
@@ -124,11 +125,9 @@
         case RET_WORD: return sv_2mortal( newSViv ((int) val & 0xffff ));
         case RET_PTR:  return sv_2mortal( newSViv ((int) val ));
         case RET_STR:  return sv_2mortal( newSVpv ((char *) val, 0 ));
-
-        default:
-            croak ("Bad return type %d", type);
-            break;
     }
+    croak ("Bad return type %d", type);
+    return &PL_sv_undef;
 }
 
 
Index: programs/winetest/winetest.c
===================================================================
RCS file: /home/wine/wine/programs/winetest/winetest.c,v
retrieving revision 1.4
diff -u -r1.4 winetest.c
--- programs/winetest/winetest.c	2002/01/14 19:54:29	1.4
+++ programs/winetest/winetest.c	2002/01/27 05:27:02
@@ -148,8 +148,6 @@
     PerlInterpreter *perl;
     int status;
 
-    envp = environ;  /* envp is not valid (yet) in Winelib */
-
     pGetLastError = GetProcAddress( GetModuleHandleA("kernel32"), "GetLastError" );
     assert( pGetLastError );
 


More information about the wine-patches mailing list