VirtualBox

Ignore:
Timestamp:
May 15, 2012 11:48:39 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77975
Message:

Runtime/common/log/log: gcc thinks that the address of a variable is always != NULL but this is not true for g_Logger (special case in our RC module loader)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/log/log.cpp

    r40938 r41305  
    21132113    {
    21142114#ifdef IN_RC
    2115         pLogger = &g_Logger;
     2115        /*
     2116         * XXX gcc assumes that the address of a variable is always > 0 but this
     2117         * is not always true for g_Logger (special case in our RC loader)
     2118         */
     2119        PRTLOGGER pLogger1 = &g_Logger;
     2120        pLogger = ASMAtomicReadPtrT(&pLogger, PRTLOGGER);
    21162121#else
    21172122        pLogger = g_pLogger;
     
    21592164{
    21602165#ifdef IN_RC
    2161     return &g_Logger;
     2166    /*
     2167     * XXX gcc assumes that the address of a variable is always > 0 but this
     2168     * is not always true for g_Logger (special case in our RC loader)
     2169     */
     2170    PRTLOGGER pLogger = &g_Logger;
     2171    return ASMAtomicReadPtrT(&pLogger, PRTLOGGER);
    21622172
    21632173#else /* !IN_RC */
     
    21962206{
    21972207#ifdef IN_RC
    2198     return &g_Logger;
     2208    /*
     2209     * XXX gcc assumes that the address of a variable is always > 0 but this
     2210     * is not always true for g_Logger (special case in our RC loader)
     2211     */
     2212    PRTLOGGER pLogger = &g_Logger;
     2213    return ASMAtomicReadPtrT(&pLogger, PRTLOGGER);
    21992214#else
    22002215# ifdef IN_RING0
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