Author: tkreuzer Date: Sun Aug 12 12:26:48 2012 New Revision: 57060
URL: http://svn.reactos.org/svn/reactos?rev=57060&view=rev Log: [WIDL] Fix MSVC warnings. Could be sent to wine ;-)
Modified: trunk/reactos/tools/widl/typegen.c trunk/reactos/tools/widl/widl_ros.diff trunk/reactos/tools/widl/widltypes.h trunk/reactos/tools/widl/write_msft.c
Modified: trunk/reactos/tools/widl/typegen.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/typegen.c?rev=57... ============================================================================== --- trunk/reactos/tools/widl/typegen.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/typegen.c [iso-8859-1] Sun Aug 12 12:26:48 2012 @@ -2345,7 +2345,8 @@ return; } } - return write_member_type(file, type, cont_is_complex, NULL, elem, NULL, tfsoff); + write_member_type(file, type, cont_is_complex, NULL, elem, NULL, tfsoff); + return; }
static void write_end(FILE *file, unsigned int *tfsoff)
Modified: trunk/reactos/tools/widl/widl_ros.diff URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl_ros.diff?re... ============================================================================== --- trunk/reactos/tools/widl/widl_ros.diff [iso-8859-1] (original) +++ trunk/reactos/tools/widl/widl_ros.diff [iso-8859-1] Sun Aug 12 12:26:48 2012 @@ -84,7 +84,7 @@ diff -u wine-1.3.4/tools/widl/widltypes.h tools/widl/widltypes.h --- wine-1.3.4/tools/widl/widltypes.h 2010-09-19 17:51:38.890625000 +0200 +++ tools/widl/widltypes.h 2010-09-19 19:17:19.656250000 +0200 -@@ -21,6 +21,13 @@ +@@ -21,6 +21,15 @@ #ifndef __WIDL_WIDLTYPES_H #define __WIDL_WIDLTYPES_H
@@ -93,7 +93,9 @@ +#define E_OUTOFMEMORY ((HRESULT)0x8007000EL) +#define TYPE_E_IOERROR ((HRESULT)0x80028CA2L) + ++#ifndef max +#define max(a, b) ((a) > (b) ? a : b) ++#endif + #include <stdarg.h> #include <assert.h> @@ -124,3 +126,28 @@
#include "widl.h" #include "typelib.h" +@@ -2023,7 +2023,10 @@ + } + + if (is_attr(interface->attrs, ATTR_DISPINTERFACE)) +- return add_dispinterface_typeinfo(typelib, interface); ++ { ++ add_dispinterface_typeinfo(typelib, interface); ++ return; ++ } + + /* midl adds the parent interface first, unless the parent itself + has no parent (i.e. it stops before IUnknown). */ +diff -u wine-1.3.4/tools/widl/typegen.c tools/widl/typegen.c +--- wine-1.3.4/tools/widl/typegen.c 2010-09-19 17:51:48.531250000 +0200 ++++ tools/widl/typegen.c 2012-08-12 14:19:47.000000000 +0200 +@@ -2345,7 +2345,8 @@ + return; + } + } +- return write_member_type(file, type, cont_is_complex, NULL, elem, NULL, tfsoff); ++ write_member_type(file, type, cont_is_complex, NULL, elem, NULL, tfsoff); ++ return; + } + + static void write_end(FILE *file, unsigned int *tfsoff)
Modified: trunk/reactos/tools/widl/widltypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widltypes.h?rev=... ============================================================================== --- trunk/reactos/tools/widl/widltypes.h [iso-8859-1] (original) +++ trunk/reactos/tools/widl/widltypes.h [iso-8859-1] Sun Aug 12 12:26:48 2012 @@ -26,7 +26,9 @@ #define E_OUTOFMEMORY ((HRESULT)0x8007000EL) #define TYPE_E_IOERROR ((HRESULT)0x80028CA2L)
+#ifndef max #define max(a, b) ((a) > (b) ? a : b) +#endif
#include <stdarg.h> #include <assert.h>
Modified: trunk/reactos/tools/widl/write_msft.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/write_msft.c?rev... ============================================================================== --- trunk/reactos/tools/widl/write_msft.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/write_msft.c [iso-8859-1] Sun Aug 12 12:26:48 2012 @@ -2025,7 +2025,10 @@ }
if (is_attr(interface->attrs, ATTR_DISPINTERFACE)) - return add_dispinterface_typeinfo(typelib, interface); + { + add_dispinterface_typeinfo(typelib, interface); + return; + }
/* midl adds the parent interface first, unless the parent itself has no parent (i.e. it stops before IUnknown). */