VirtualBox

Ignore:
Timestamp:
Jul 10, 2020 9:01:02 AM (5 years ago)
Author:
vboxsync
Message:

*: Some missing DECLCALLBACK/RTDECL and related nothrow issues raised by Clang. bugref:9794 bugref:9790

File:
1 edited

Legend:

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

    r85121 r85160  
    239239
    240240/*********************************************************************************************************************************
    241 *   Defined Constants And Macros                                                                                                 *
     241*   Internal Functions                                                                                                           *
    242242*********************************************************************************************************************************/
    243 
    244243static DECLCALLBACK(int) rtTraceLogRdrHdrRecvd(PRTTRACELOGRDRINT pThis, RTTRACELOGRDRPOLLEVT *penmEvt, bool *pfContinuePoll);
    245244static DECLCALLBACK(int) rtTraceLogRdrHdrDescRecvd(PRTTRACELOGRDRINT pThis, RTTRACELOGRDRPOLLEVT *penmEvt, bool *pfContinuePoll);
     
    256255/**
    257256 * State handlers.
    258  */
    259 static PFNRTTRACELOGRDRSTATEHANDLER g_apfnStateHandlers[] =
    260 {
    261     NULL,
    262     rtTraceLogRdrHdrRecvd,
    263     rtTraceLogRdrHdrDescRecvd,
    264     rtTraceLogRdrMagicRecvd,
    265     rtTraceLogRdrEvtDescRecvd,
    266     rtTraceLogRdrEvtDescIdRecvd,
    267     rtTraceLogRdrEvtDescDescriptionRecvd,
    268     rtTraceLogRdrEvtItemDescRecvd,
    269     rtTraceLogRdrEvtItemDescNameRecvd,
    270     rtTraceLogRdrEvtItemDescDescriptionRecvd,
    271     rtTraceLogRdrEvtMarkerRecvd,
    272     rtTraceLogRdrEvtDataRecvd,
    273     NULL
     257 * @note The struct wrapper is for working around a Clang nothrow attrib oddity.
     258 */
     259static struct { PFNRTTRACELOGRDRSTATEHANDLER pfn; } g_aStateHandlers[] =
     260{
     261    { NULL },
     262    { rtTraceLogRdrHdrRecvd },
     263    { rtTraceLogRdrHdrDescRecvd },
     264    { rtTraceLogRdrMagicRecvd },
     265    { rtTraceLogRdrEvtDescRecvd },
     266    { rtTraceLogRdrEvtDescIdRecvd },
     267    { rtTraceLogRdrEvtDescDescriptionRecvd },
     268    { rtTraceLogRdrEvtItemDescRecvd },
     269    { rtTraceLogRdrEvtItemDescNameRecvd },
     270    { rtTraceLogRdrEvtItemDescDescriptionRecvd },
     271    { rtTraceLogRdrEvtMarkerRecvd },
     272    { rtTraceLogRdrEvtDataRecvd },
     273    { NULL }
    274274};
    275275
     
    15701570            {
    15711571                /* Act according to the current state. */
    1572                 rc = g_apfnStateHandlers[pThis->enmState](pThis, penmEvt, &fContinue);
     1572                rc = g_aStateHandlers[pThis->enmState].pfn(pThis, penmEvt, &fContinue);
    15731573            }
    15741574            else
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