That's illegal, macros can't be overloaded.

drivers/filesystems/ext2/inc/ext2fsd.h:64:0: warning: "try_return" redefined 
[enabled by default]

You could try
#define try_return(...) { __VA_ARGS__; goto try_exit; }

If that doesn't do it, it might simply need a separate macro
(I'm not sure to what extent this is third party code though)

(also if these were the last instances of that -- and I think so --, we
might want to make 4003 an error)


On 2014-03-24 23:20, hbelu...@svn.reactos.org wrote:
> Author: hbelusca
> Date: Mon Mar 24 22:20:52 2014
> New Revision: 62562
> 
> URL: http://svn.reactos.org/svn/reactos?rev=62562&view=rev
> Log:
> [EXT2]
> try_return() == try_return(S) with nothing in S . The code sometimes use it.
> Shut up MSVC warning C4003: not enough actual parameters for macro 
> 'try_return'.
> 
> Modified:
>     trunk/reactos/drivers/filesystems/ext2/inc/ext2fsd.h
> 
> Modified: trunk/reactos/drivers/filesystems/ext2/inc/ext2fsd.h
> URL: 
> http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/inc/ext2fsd.h?rev=62562&r1=62561&r2=62562&view=diff
> ==============================================================================
> --- trunk/reactos/drivers/filesystems/ext2/inc/ext2fsd.h      [iso-8859-1] 
> (original)
> +++ trunk/reactos/drivers/filesystems/ext2/inc/ext2fsd.h      [iso-8859-1] 
> Mon Mar 24 22:20:52 2014
> @@ -60,6 +60,7 @@
>  extern Ext2Data                              Ext2GlobalData;
>  
>  // try-finally simulation
> +#define try_return() { goto try_exit; }
>  #define try_return(S)        { S; goto try_exit; }
>  #define try_return1(S)       { S; goto try_exit1; }
>  #define try_return2(S)       { S; goto try_exit2; }
> 
> 


_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to