VirtualBox

Changeset 90005 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Jul 2, 2021 7:07:42 PM (4 years ago)
Author:
vboxsync
Message:

AudioTest: doxygen fix. @todo bugref:10008

File:
1 edited

Legend:

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

    r90004 r90005  
    16721672    if (RT_SUCCESS(rc))
    16731673    {
     1674        /** @todo r=bird: see comment in audioTestObjOpen about how reckless it is to
     1675         * leave most of the phObj structure uninitialized. */
     1676
    16741677        if (RTStrPrintf2(phObj->szSec, sizeof(phObj->szSec), "obj_%s", szUuid) <= 0)
    1675             AssertFailedReturn(VERR_BUFFER_OVERFLOW);
     1678            AssertFailedReturn(VERR_BUFFER_OVERFLOW); /** @todo r=bird: AssertReturn(RTStrPrintf2() > 0); results in better code. */
    16761679
    16771680        /** @todo Check test section existence. */
     
    17361739 *
    17371740 * @returns VBox status code.
    1738  * @param   pSet                Audio test set the object contains.
    17391741 * @param   phObj               Object handle to open.
    17401742 * @param   ppObj               Where to return the pointer of the allocated and registered audio test object.
     
    17421744static int audioTestObjOpen(PAUDIOTESTOBJINT phObj, PAUDIOTESTOBJINT *ppObj)
    17431745{
     1746    /** @todo r=bird: phObj and ppObj: why the 'h' in the first and not the
     1747     * latter? They are of the same type, which is suffixed 'INT', so the 'h'
     1748     * is probably out of place.
     1749     *
     1750     * An immediate question just looking at this function, would why this isn't a
     1751     * 'duplicate' instead of a 'open' operation.  However, looking at how little
     1752     * audioTestObjGetChild actually does to the phObj we're getting from
     1753     * audioTestVerifyTestToneData, it looks more like phObj is just a convenient
     1754     * way of passing a PAUDIOTESTSET and a section name (szSec) around without
     1755     * actually initializing anything else in the structure.
     1756     *
     1757     * This is reckless (7+ uninitialized members) and 'ing confusing code! */
    17441758    PAUDIOTESTOBJINT pObj = (PAUDIOTESTOBJINT)RTMemAlloc(sizeof(AUDIOTESTOBJINT));
    17451759    AssertPtrReturn(pObj, VERR_NO_MEMORY);
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