VirtualBox

Changeset 75120 in vbox for trunk


Ignore:
Timestamp:
Oct 26, 2018 8:51:21 PM (6 years ago)
Author:
vboxsync
Message:

DevHDA: Timer description string passed to PDMDevHlpTMTimerCreate shall not be a stack variable. Read the documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHDA.cpp

    r74067 r75120  
    52135213         * Create all hardware streams.
    52145214         */
     5215        static const char * const s_apszNames[] =
     5216        {
     5217            "HDA SD0", "HDA SD1", "HDA SD2", "HDA SD3",
     5218            "HDA SD4", "HDA SD5", "HDA SD6", "HDA SD7",
     5219        };
     5220        AssertCompile(RT_ELEMENTS(s_apszNames) == HDA_MAX_STREAMS);
    52155221        for (uint8_t i = 0; i < HDA_MAX_STREAMS; ++i)
    52165222        {
     
    52215227             *        instead of the LPIB registers.
    52225228             */
    5223             char szTimer[16];
    5224             RTStrPrintf2(szTimer, sizeof(szTimer), "HDA SD%RU8", i);
    5225 
    52265229            rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL_SYNC, hdaR3Timer, &pThis->aStreams[i],
    5227                                         TMTIMER_FLAGS_NO_CRIT_SECT, szTimer, &pThis->pTimer[i]);
     5230                                        TMTIMER_FLAGS_NO_CRIT_SECT, s_apszNames[i], &pThis->pTimer[i]);
    52285231            AssertRCReturn(rc, rc);
    52295232
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