VirtualBox

Changeset 105338 in vbox for trunk/src


Ignore:
Timestamp:
Jul 16, 2024 8:19:51 AM (5 months ago)
Author:
vboxsync
Message:

XPCOM/IPCM: Calling convention fixes. bugref:10725

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/daemon/src/ipcCommandModule.cpp

    r103472 r105338  
    4646#include <VBox/log.h>
    4747
    48 typedef void FNIPCMMSGHANDLER(PIPCDCLIENT pIpcClient, PCIPCMSG pMsg);
     48typedef DECLCALLBACKTYPE(void, FNIPCMMSGHANDLER,(PIPCDCLIENT pIpcClient, PCIPCMSG pMsg));
    4949/** Pointer to a IPCM message handler. */
    5050typedef FNIPCMMSGHANDLER *PFNIPCMMSGHANDLER;
     
    223223DECLHIDDEN(void) IPCM_HandleMsg(PIPCDCLIENT pIpcClient, PCIPCMSG pMsg)
    224224{
    225     static const PFNIPCMMSGHANDLER aHandlers[] =
    226     {
    227         ipcmOnPing,
    228         ipcmOnForward,
    229         ipcmOnClientHello,
    230         ipcmOnClientAddName,
    231         ipcmOnClientDelName,
    232         ipcmOnClientAddTarget,
    233         ipcmOnClientDelTarget,
    234         ipcmOnQueryClientByName
     225    static const struct CLANG11NONSENSE { PFNIPCMMSGHANDLER pfn; } s_aHandlers[] =
     226    {
     227        { ipcmOnPing              },
     228        { ipcmOnForward           },
     229        { ipcmOnClientHello       },
     230        { ipcmOnClientAddName     },
     231        { ipcmOnClientDelName     },
     232        { ipcmOnClientAddTarget   },
     233        { ipcmOnClientDelTarget   },
     234        { ipcmOnQueryClientByName },
    235235    };
    236236
     
    246246    u32Type &= ~IPCM_MSG_CLASS_REQ;
    247247    u32Type--;
    248     if (u32Type >= RT_ELEMENTS(aHandlers))
     248    if (u32Type >= RT_ELEMENTS(s_aHandlers))
    249249    {
    250250        Log(("unknown request -- ignoring message\n"));
     
    252252    }
    253253
    254     aHandlers[u32Type](pIpcClient, pMsg);
    255 }
     254    s_aHandlers[u32Type].pfn(pIpcClient, pMsg);
     255}
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