VirtualBox

Changeset 38738 in vbox


Ignore:
Timestamp:
Sep 13, 2011 2:31:50 PM (13 years ago)
Author:
vboxsync
Message:

Less Assert redefinition, adding RT_NO_STRICT to help.

Location:
trunk
Files:
3 edited

Legend:

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

    r37535 r38738  
    8080# define IN_RT_STATIC
    8181# define RT_STRICT
     82# define RT_NO_STRICT
    8283# define RT_LOCK_STRICT
    8384# define RT_LOCK_NO_STRICT
     
    21452146/** @def RT_STRICT
    21462147 * The \#define RT_STRICT controls whether or not assertions and other runtime
    2147  * checks should be compiled in or not.
     2148 * checks should be compiled in or not.  This is defined when DEBUG is defined.
     2149 * If RT_NO_STRICT is defined, it will unconditionally be undefined.
    21482150 *
    21492151 * If you want assertions which are not subject to compile time options use
     
    21522154#if !defined(RT_STRICT) && defined(DEBUG)
    21532155# define RT_STRICT
     2156#endif
     2157#ifdef RT_NO_STRICT
     2158# undef RT_STRICT
    21542159#endif
    21552160
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltCmn-win.h

    r36184 r38738  
    44 * Common header with configuration defines and global defs
    55 */
     6
    67/*
    78 * Copyright (C) 2011 Oracle Corporation
     
    1516 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1617 */
     18
    1719#ifndef ___VBoxNetFltCmn_win_h___
    1820#define ___VBoxNetFltCmn_win_h___
     
    2426//# define DEBUG_NETFLT_PACKETS
    2527# ifndef DEBUG_misha
    26 #  define DEBUG_NETFLT_NOASSERT
     28#  define RT_NO_STRICT
    2729# endif
    2830/* # define DEBUG_NETFLT_LOOPBACK */
     
    530532#include "VBoxNetFltRt-win.h"
    531533#ifndef VBOXNETADP
    532 #include "VBoxNetFltP-win.h"
    533 #endif
    534 # include "VBoxNetFltM-win.h"
    535 
    536 #ifdef DEBUG_NETFLT_NOASSERT
    537 # ifdef Assert
    538 #  undef Assert
    539 # endif
    540 
    541 # define Assert(_expr) do {} while (0)
    542 #endif /* #ifdef DEBUG_NETFLT_NOASSERT */
     534# include "VBoxNetFltP-win.h"
     535#endif
     536#include "VBoxNetFltM-win.h"
    543537
    544538#endif /* #ifndef ___VBoxNetFltCmn_win_h___ */
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp

    r36184 r38738  
    2525
    2626#ifdef DEBUG
    27 # define Assert(a) assert(a)
    28 # define AssertBreakpoint() assert(0)
    29 
     27# define NonStandardAssert(a) assert(a)
     28# define NonStandardAssertBreakpoint() assert(0)
    3029#else
    31 # define Assert(a) do{}while (0)
    32 # define AssertBreakpoint() do{}while (0)
    33 
     30# define NonStandardAssert(a) do{}while (0)
     31# define NonStandardAssertBreakpoint() do{}while (0)
    3432#endif
    3533
     
    6563    cleanup();
    6664
    67     Assert(pNetCfg);
    68     Assert(pNetCfgComponent);
     65    NonStandardAssert(pNetCfg);
     66    NonStandardAssert(pNetCfgComponent);
    6967    if (pNetCfg)
    7068    {
     
    122120        {
    123121            hr = HRESULT_FROM_WIN32(winEr);
    124             AssertBreakpoint();
     122            NonStandardAssertBreakpoint();
    125123        }
    126124
     
    129127    else
    130128    {
    131         AssertBreakpoint();
     129        NonStandardAssertBreakpoint();
    132130    }
    133131
     
    163161        {
    164162            hr = HRESULT_FROM_WIN32(winEr);
    165             AssertBreakpoint();
     163            NonStandardAssertBreakpoint();
    166164        }
    167165    }
     
    169167    {
    170168        hr = HRESULT_FROM_WIN32(winEr);
    171         AssertBreakpoint();
     169        NonStandardAssertBreakpoint();
    172170    }
    173171
     
    184182        if (hr != S_OK)
    185183        {
    186             AssertBreakpoint();
     184            NonStandardAssertBreakpoint();
    187185        }
    188186        RegCloseKey(InstanceKey);
     
    190188    else
    191189    {
    192         AssertBreakpoint();
     190        NonStandardAssertBreakpoint();
    193191    }
    194192
     
    215213    else
    216214    {
    217         AssertBreakpoint();
     215        NonStandardAssertBreakpoint();
    218216    }
    219217
     
    267265                    else
    268266                    {
    269                         AssertBreakpoint();
     267                        NonStandardAssertBreakpoint();
    270268                        *pbShouldBind = true;
    271269                    }
     
    274272                {
    275273                    /* TODO: we should check the default medium in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\<driver_id>\Ndi\Params\Medium, REG_SZ "Default" value */
    276                     AssertBreakpoint();
     274                    NonStandardAssertBreakpoint();
    277275                    *pbShouldBind = true;
    278276                }
     
    282280            else
    283281            {
    284                 AssertBreakpoint();
     282                NonStandardAssertBreakpoint();
    285283            }
    286284        }
     
    293291    else
    294292    {
    295         AssertBreakpoint();
     293        NonStandardAssertBreakpoint();
    296294    }
    297295
     
    337335                /* do not set err status to it */
    338336                *pbShouldBind = false;
    339                 AssertBreakpoint();
     337                NonStandardAssertBreakpoint();
    340338            }
    341339
     
    345343        {
    346344            hr = HRESULT_FROM_WIN32(winEr);
    347             AssertBreakpoint();
     345            NonStandardAssertBreakpoint();
    348346        }
    349347
     
    352350    else
    353351    {
    354         AssertBreakpoint();
     352        NonStandardAssertBreakpoint();
    355353    }
    356354
     
    369367        if (hr != S_OK)
    370368        {
    371             AssertBreakpoint();
     369            NonStandardAssertBreakpoint();
    372370            break;
    373371        }
     
    443441    else
    444442    {
    445         AssertBreakpoint();
     443        NonStandardAssertBreakpoint();
    446444    }
    447445
     
    490488                else
    491489                {
    492                     AssertBreakpoint();
     490                    NonStandardAssertBreakpoint();
    493491                    /* break on falure */
    494492                    break;
     
    498496        else
    499497        {
    500             AssertBreakpoint();
     498            NonStandardAssertBreakpoint();
    501499        }
    502500
     
    505503    else
    506504    {
    507         AssertBreakpoint();
     505        NonStandardAssertBreakpoint();
    508506    }
    509507
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