VirtualBox

Changeset 62901 in vbox for trunk


Ignore:
Timestamp:
Aug 3, 2016 10:11:57 AM (8 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Added RT_NOREF(...) - the C99 version of the RT_NOREFnn() macros. Added a bunch more RT_NOREFnn() macros for stubbed functions with lots of parameters (max is 22 now). This is mainly so RT_NOREF works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r62669 r62901  
    27872787
    27882788/** @def RT_NOREF1
    2789  * RT_NOREF_PV shorthand taking on parameter.
    2790  */
     2789 * RT_NOREF_PV shorthand taking on parameter. */
    27912790#define RT_NOREF1(var1)                                 RT_NOREF_PV(var1)
    27922791/** @def RT_NOREF2
    2793  * RT_NOREF_PV shorthand taking two parameters.
    2794  */
     2792 * RT_NOREF_PV shorthand taking two parameters. */
    27952793#define RT_NOREF2(var1, var2)                           RT_NOREF_PV(var1); RT_NOREF1(var2)
    27962794/** @def RT_NOREF3
    2797  * RT_NOREF_PV shorthand taking three parameters.
    2798  */
     2795 * RT_NOREF_PV shorthand taking three parameters. */
    27992796#define RT_NOREF3(var1, var2, var3)                     RT_NOREF_PV(var1); RT_NOREF2(var2, var3)
    28002797/** @def RT_NOREF4
    2801  * RT_NOREF_PV shorthand taking four parameters.
    2802  */
     2798 * RT_NOREF_PV shorthand taking four parameters. */
    28032799#define RT_NOREF4(var1, var2, var3, var4)               RT_NOREF_PV(var1); RT_NOREF3(var2, var3, var4)
    28042800/** @def RT_NOREF5
    2805  * RT_NOREF_PV shorthand taking five parameters.
    2806  */
     2801 * RT_NOREF_PV shorthand taking five parameters. */
    28072802#define RT_NOREF5(var1, var2, var3, var4, var5)         RT_NOREF_PV(var1); RT_NOREF4(var2, var3, var4, var5)
    28082803/** @def RT_NOREF6
    2809  * RT_NOREF_PV shorthand taking six parameters.
    2810  */
     2804 * RT_NOREF_PV shorthand taking six parameters.  */
    28112805#define RT_NOREF6(var1, var2, var3, var4, var5, var6)   RT_NOREF_PV(var1); RT_NOREF5(var2, var3, var4, var5, var6)
    28122806/** @def RT_NOREF7
    2813  * RT_NOREF_PV shorthand taking seven parameters.
    2814  */
     2807 * RT_NOREF_PV shorthand taking seven parameters.  */
    28152808#define RT_NOREF7(var1, var2, var3, var4, var5, var6, var7) \
    28162809    RT_NOREF_PV(var1); RT_NOREF6(var2, var3, var4, var5, var6, var7)
    28172810/** @def RT_NOREF8
    2818  * RT_NOREF_PV shorthand taking eight parameters.
    2819  */
     2811 * RT_NOREF_PV shorthand taking eight parameters.  */
    28202812#define RT_NOREF8(var1, var2, var3, var4, var5, var6, var7, var8) \
    28212813    RT_NOREF_PV(var1); RT_NOREF7(var2, var3, var4, var5, var6, var7, var8)
    28222814/** @def RT_NOREF9
    2823  * RT_NOREF_PV shorthand taking nine parameters.
    2824  */
     2815 * RT_NOREF_PV shorthand taking nine parameters.  */
    28252816#define RT_NOREF9(var1, var2, var3, var4, var5, var6, var7, var8, var9) \
    28262817    RT_NOREF_PV(var1); RT_NOREF8(var2, var3, var4, var5, var6, var7, var8)
     2818/** @def RT_NOREF10
     2819 * RT_NOREF_PV shorthand taking ten parameters.  */
     2820#define RT_NOREF10(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10) \
     2821    RT_NOREF_PV(var1); RT_NOREF_PV(var2); RT_NOREF_PV(var3); RT_NOREF_PV(var4); RT_NOREF_PV(var5); RT_NOREF_PV(var6); \
     2822    RT_NOREF_PV(var7); RT_NOREF_PV(var8); RT_NOREF_PV(var9); RT_NOREF_PV(var10)
     2823/** @def RT_NOREF11
     2824 * RT_NOREF_PV shorthand taking eleven parameters.  */
     2825#define RT_NOREF11(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11) \
     2826    RT_NOREF_PV(var1); RT_NOREF10(var2, var3, var4, var5, var6, var7, var8, var9, var10)
     2827/** @def RT_NOREF12
     2828 * RT_NOREF_PV shorthand taking twelve parameters.  */
     2829#define RT_NOREF12(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12) \
     2830    RT_NOREF_PV(var1); RT_NOREF11(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12)
     2831/** @def RT_NOREF13
     2832 * RT_NOREF_PV shorthand taking thirteen parameters.  */
     2833#define RT_NOREF13(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13) \
     2834    RT_NOREF_PV(var1); RT_NOREF12(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13)
     2835/** @def RT_NOREF14
     2836 * RT_NOREF_PV shorthand taking fourteen parameters.  */
     2837#define RT_NOREF14(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14) \
     2838    RT_NOREF_PV(var1); RT_NOREF13(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14)
     2839/** @def RT_NOREF15
     2840 * RT_NOREF_PV shorthand taking fifteen parameters.  */
     2841#define RT_NOREF15(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15) \
     2842    RT_NOREF_PV(var1); RT_NOREF14(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15)
     2843/** @def RT_NOREF16
     2844 * RT_NOREF_PV shorthand taking fifteen parameters.  */
     2845#define RT_NOREF16(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16) \
     2846    RT_NOREF_PV(var1); RT_NOREF15(var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16)
     2847/** @def RT_NOREF17
     2848 * RT_NOREF_PV shorthand taking seventeen parameters.  */
     2849#define RT_NOREF17(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) \
     2850    RT_NOREF_PV(v1); RT_NOREF16(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17)
     2851/** @def RT_NOREF18
     2852 * RT_NOREF_PV shorthand taking eighteen parameters.  */
     2853#define RT_NOREF18(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) \
     2854    RT_NOREF_PV(v1); RT_NOREF17(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18)
     2855/** @def RT_NOREF19
     2856 * RT_NOREF_PV shorthand taking nineteen parameters.  */
     2857#define RT_NOREF19(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) \
     2858    RT_NOREF_PV(v1); RT_NOREF18(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)
     2859/** @def RT_NOREF20
     2860 * RT_NOREF_PV shorthand taking twenty parameters.  */
     2861#define RT_NOREF20(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) \
     2862    RT_NOREF_PV(v1); RT_NOREF19(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20)
     2863/** @def RT_NOREF21
     2864 * RT_NOREF_PV shorthand taking twentyone parameters.  */
     2865#define RT_NOREF21(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) \
     2866    RT_NOREF_PV(v1); RT_NOREF20(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21)
     2867/** @def RT_NOREF22
     2868 * RT_NOREF_PV shorthand taking twentytwo parameters.  */
     2869#define RT_NOREF22(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) \
     2870    RT_NOREF_PV(v1); RT_NOREF21(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22)
     2871
     2872/** @def RT_NOREF
     2873 * RT_NOREF_PV variant using the variadic macro feature of C99.
     2874 * @remarks Only use this in sources */
     2875#ifdef RT_COMPILER_SUPPORTS_VA_ARGS
     2876# define RT_NOREF(...) \
     2877    RT_UNPACK_CALL(RT_CONCAT(RT_NOREF, RT_EXPAND(RT_COUNT_VA_ARGS(__VA_ARGS__))),(__VA_ARGS__))
     2878#endif
    28272879
    28282880
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette