VirtualBox

Changeset 99775 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 12, 2023 12:21:58 PM (19 months ago)
Author:
vboxsync
Message:

*: Mark functions as static if not used outside of a given compilation unit. Enables the compiler to optimize inlining, reduces the symbol tables, exposes unused functions and in some rare cases exposes mismtaches between function declarations and definitions, but most importantly reduces the number of parfait reports for the extern-function-no-forward-declaration category. This should not result in any functional changes, bugref:3409

Location:
trunk/src/VBox/Devices
Files:
15 edited

Legend:

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

    r98103 r99775  
    906906 * @interface_method_impl{ATSTRANSPORT,pfnUsage}
    907907 */
    908 DECLCALLBACK(void) atsTcpUsage(PRTSTREAM pStream)
     908static DECLCALLBACK(void) atsTcpUsage(PRTSTREAM pStream)
    909909{
    910910    RTStrmPrintf(pStream,
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r99750 r99775  
    12231223 * @callback_method_impl{FNDBGFHANDLERDEV, 'pirq'}
    12241224 */
    1225 DECLCALLBACK(void) devpciR3InfoPIRQ(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     1225static DECLCALLBACK(void) devpciR3InfoPIRQ(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
    12261226{
    12271227    PDEVPCIROOT pGlobals = PDMINS_2_DATA(pDevIns, PDEVPCIROOT);
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r99766 r99775  
    38173817 * @interface_method_impl{PDMDEVREGR0,pfnConstruct}
    38183818 */
    3819 DECLCALLBACK(int) ich9pciRZConstruct(PPDMDEVINS pDevIns)
     3819static DECLCALLBACK(int) ich9pciRZConstruct(PPDMDEVINS pDevIns)
    38203820{
    38213821    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
     
    38573857 * @interface_method_impl{PDMDEVREGR0,pfnConstruct}
    38583858 */
    3859 DECLCALLBACK(int) ich9pcibridgeRZConstruct(PPDMDEVINS pDevIns)
     3859static DECLCALLBACK(int) ich9pcibridgeRZConstruct(PPDMDEVINS pDevIns)
    38603860{
    38613861    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp

    r99740 r99775  
    899899 * @param   pThisCC     The VGA/VMSVGA state for ring-3.
    900900 */
    901 void vmsvgaR3VBVAResize(PVGASTATE pThis, PVGASTATECC pThisCC)
     901static void vmsvgaR3VBVAResize(PVGASTATE pThis, PVGASTATECC pThisCC)
    902902{
    903903    int rc;
     
    45634563 * @param   pThisCC     The VGA/VMSVGA state for ring-3.
    45644564 */
    4565 void vmsvgaR3FifoPendingActions(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)
     4565static void vmsvgaR3FifoPendingActions(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)
    45664566{
    45674567    RT_NOREF(pDevIns);
     
    53935393 * @callback_method_impl{FNDBGFHANDLERDEV, "vmsvga3dsfc"}
    53945394 */
    5395 DECLCALLBACK(void) vmsvgaR3Info3dSurface(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     5395static DECLCALLBACK(void) vmsvgaR3Info3dSurface(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
    53965396{
    53975397    /* There might be a specific surface ID at the start of the
     
    54385438 * @callback_method_impl{FNDBGFHANDLERDEV, "vmsvga3dsurf"}
    54395439 */
    5440 DECLCALLBACK(void) vmsvgaR3Info3dSurfaceBmp(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     5440static DECLCALLBACK(void) vmsvgaR3Info3dSurfaceBmp(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
    54415441{
    54425442    /* pszArg = "sid[>dir]"
     
    54635463 * @callback_method_impl{FNDBGFHANDLERDEV, "vmsvga3dctx"}
    54645464 */
    5465 DECLCALLBACK(void) vmsvgaR3Info3dContext(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     5465static DECLCALLBACK(void) vmsvgaR3Info3dContext(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
    54665466{
    54675467    /* There might be a specific surface ID at the start of the
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r99688 r99775  
    32253225 * @param   pvUser          pointer to pState structure
    32263226 */
    3227 DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD hThreadSelf, void *pvUser)
     3227static DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD hThreadSelf, void *pvUser)
    32283228{
    32293229    RT_NOREF(hThreadSelf);
     
    55975597}
    55985598
    5599 uint32_t vmsvga3dSVGA3dColor2RGBA(SVGA3dColor value)
     5599#if 0 /* unused */
     5600static uint32_t vmsvga3dSVGA3dColor2RGBA(SVGA3dColor value)
    56005601{
    56015602    /* flip the red and blue bytes */
     
    56045605    return (value & 0xff00ff00) | red | (blue << 16);
    56055606}
     5607#endif
    56065608
    56075609static DECLCALLBACK(int) vmsvga3dBackSetTextureState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState)
     
    64266428
    64276429/* Convert VMWare vertex declaration to its OpenGL equivalent. */
    6428 int vmsvga3dVertexDecl2OGL(SVGA3dVertexArrayIdentity &identity, GLint &size, GLenum &type, GLboolean &normalized, uint32_t &cbAttrib)
     6430static int vmsvga3dVertexDecl2OGL(SVGA3dVertexArrayIdentity &identity, GLint &size, GLenum &type, GLboolean &normalized, uint32_t &cbAttrib)
    64296431{
    64306432    normalized = GL_FALSE;
     
    66916693/* Convert VMWare primitive type to its OpenGL equivalent. */
    66926694/* Calculate the vertex count based on the primitive type and nr of primitives. */
    6693 int vmsvga3dPrimitiveType2OGL(SVGA3dPrimitiveType PrimitiveType, GLenum *pMode, uint32_t cPrimitiveCount, uint32_t *pcVertices)
     6695static int vmsvga3dPrimitiveType2OGL(SVGA3dPrimitiveType PrimitiveType, GLenum *pMode, uint32_t cPrimitiveCount, uint32_t *pcVertices)
    66946696{
    66956697    switch (PrimitiveType)
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r99739 r99775  
    576576}
    577577
    578 int vga_ioport_invalid(PVGASTATE pThis, uint32_t addr)
     578static int vga_ioport_invalid(PVGASTATE pThis, uint32_t addr)
    579579{
    580580    if (pThis->msr & MSR_COLOR_EMULATION) {
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp

    r98103 r99775  
    16671667}
    16681668
    1669 int hgsmiCompleteGuestCommand(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer, bool fDoIrq)
     1669static int hgsmiCompleteGuestCommand(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer, bool fDoIrq)
    16701670{
    16711671    int rc = hgsmiGuestCommandComplete(pIns, offBuffer);
  • trunk/src/VBox/Devices/Input/DevPS2M.cpp

    r98103 r99775  
    423423
    424424/* Determine whether a reporting rate is one of the valid ones. */
    425 bool ps2mIsRateSupported(uint8_t rate)
     425static bool ps2mIsRateSupported(uint8_t rate)
    426426{
    427427    static uint8_t  aValidRates[] = { 10, 20, 40, 60, 80, 100, 200 };
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r98121 r99775  
    15801580 * @param   fOn             New LED state.
    15811581 */
    1582 void virtioNetR3SetReadLed(PVIRTIONETR3 pThisR3, bool fOn)
     1582static void virtioNetR3SetReadLed(PVIRTIONETR3 pThisR3, bool fOn)
    15831583{
    15841584    if (fOn)
     
    15951595 * @param   fOn            New LED state.
    15961596 */
    1597 void virtioNetR3SetWriteLed(PVIRTIONETR3 pThisR3, bool fOn)
     1597static void virtioNetR3SetWriteLed(PVIRTIONETR3 pThisR3, bool fOn)
    15981598{
    15991599    if (fOn)
  • trunk/src/VBox/Devices/Network/DrvCloudTunnel.cpp

    r98103 r99775  
    6060# define INVALID_SOCKET -1
    6161# define SOCKET_ERROR   -1
    62  int WSAGetLastError() { return errno; }
     62DECLINLINE(int) WSAGetLastError() { return errno; }
    6363#endif
    6464
     
    12651265
    12661266
    1267 DECL_NOTHROW(void) drvCloudTunnelSshLogCallback(int priority, const char *function, const char *buffer, void *userdata)
     1267static DECL_NOTHROW(void) drvCloudTunnelSshLogCallback(int priority, const char *function, const char *buffer, void *userdata)
    12681268{
    12691269    PDRVCLOUDTUNNEL pThis = (PDRVCLOUDTUNNEL)userdata;
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r99739 r99775  
    972972
    973973
     974#if 0 /* unused */
    974975/**
    975976 * Function called by slirp to check if it's possible to feed incoming data to the network port.
     
    983984}
    984985
    985 void slirp_push_recv_thread(void *pvUser)
     986static void slirp_push_recv_thread(void *pvUser)
    986987{
    987988    PDRVNAT pThis = (PDRVNAT)pvUser;
     
    989990    drvNATUrgRecvWakeup(pThis->pDrvIns, pThis->pUrgRecvThread);
    990991}
     992#endif
    991993
    992994void slirp_urg_output(void *pvUser, struct mbuf *m, const uint8_t *pu8Buf, int cb)
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp

    r99739 r99775  
    34383438 * @todo Generate better SAS addresses. (Request a block from SUN probably)
    34393439 */
    3440 void lsilogicSASAddressGenerate(PSASADDRESS pSASAddress, unsigned iId)
     3440DECLINLINE(void) lsilogicSASAddressGenerate(PSASADDRESS pSASAddress, unsigned iId)
    34413441{
    34423442    pSASAddress->u8Address[0] = (0x5 << 5);
  • trunk/src/VBox/Devices/Storage/DrvRamDisk.cpp

    r99739 r99775  
    725725 * @param   rc        Status code to check.
    726726 */
    727 bool drvramdiskMediaExIoReqIsRedoSetWarning(PDRVRAMDISK pThis, int rc)
     727static bool drvramdiskMediaExIoReqIsRedoSetWarning(PDRVRAMDISK pThis, int rc)
    728728{
    729729    if (rc == VERR_NO_MEMORY)
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r99739 r99775  
    23312331 * @param   rc        Status code to check.
    23322332 */
    2333 bool drvvdMediaExIoReqIsRedoSetWarning(PVBOXDISK pThis, int rc)
     2333static bool drvvdMediaExIoReqIsRedoSetWarning(PVBOXDISK pThis, int rc)
    23342334{
    23352335    if (rc == VERR_DISK_FULL)
  • trunk/src/VBox/Devices/VirtIO/VirtioCore.cpp

    r98661 r99775  
    356356#ifdef IN_RING3
    357357
    358 void virtioCoreR3FeatureDump(VIRTIOCORE *pVirtio, PCDBGFINFOHLP pHlp, const VIRTIO_FEATURES_LIST *s_aFeatures, int cFeatures, int fBanner)
     358static void virtioCoreR3FeatureDump(VIRTIOCORE *pVirtio, PCDBGFINFOHLP pHlp, const VIRTIO_FEATURES_LIST *s_aFeatures, int cFeatures, int fBanner)
    359359{
    360360#define MAXLINE 80
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