VirtualBox

Changeset 18560 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Mar 31, 2009 7:32:44 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45443
Message:

Fix warning on linux about decls-after-statement.

File:
1 edited

Legend:

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

    r18129 r18560  
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2929 */
    3030
     31/*
     32 * Note: This file is also compiled with a C compiler so it must not
     33 *       use genuine C++ features. On Linux it is compiled with
     34 *       gcc -Wdeclaration-after-statement, so avoid those if you can.
     35 */
    3136
    3237/** @page pg_rtlog      Runtime - Logging
     
    187192    static volatile uint32_t fInitializing = 0;
    188193    PRTLOGGER pLogger;
     194    int rc;
    189195
    190196    if (g_pLogger || !ASMAtomicCmpXchgU32(&fInitializing, 1, 0))
     
    299305    RTTIME Time;
    300306    RTTimeExplode(&Time, RTTimeNow(&TimeSpec));
    301     int rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_FILE,
    302                          "./%04d-%02d-%02d-%02d-%02d-%02d.%03d-%s-%d.log",
    303                          Time.i32Year, Time.u8Month, Time.u8MonthDay, Time.u8Hour, Time.u8Minute, Time.u8Second, Time.u32Nanosecond / 10000000,
    304                          RTPathFilename(szExecName), RTProcSelf());
     307    rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0], RTLOGDEST_FILE,
     308                     "./%04d-%02d-%02d-%02d-%02d-%02d.%03d-%s-%d.log",
     309                     Time.i32Year, Time.u8Month, Time.u8MonthDay, Time.u8Hour, Time.u8Minute, Time.u8Second, Time.u32Nanosecond / 10000000,
     310                     RTPathFilename(szExecName), RTProcSelf());
    305311    if (RT_SUCCESS(rc))
    306312    {
     
    379385# else  /* IN_GUEST_R3  */
    380386    /* The user destination is backdoor logging. */
    381     int rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG",
    382                          RT_ELEMENTS(g_apszGroups), &g_apszGroups[0],
    383                          RTLOGDEST_USER, "VBox.log");
     387    rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG",
     388                     RT_ELEMENTS(g_apszGroups), &g_apszGroups[0],
     389                     RTLOGDEST_USER, "VBox.log");
    384390# endif /* IN_GUEST_R3 */
    385391
    386392#else /* IN_RING0 */
    387     int rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0],
     393    rc = RTLogCreate(&pLogger, 0, NULL, "VBOX_LOG", RT_ELEMENTS(g_apszGroups), &g_apszGroups[0],
    388394# ifdef LOG_TO_BACKDOOR  /** @todo look at guest ring 0 logging */
    389395                         RTLOGDEST_USER,
Note: See TracChangeset for help on using the changeset viewer.

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