VirtualBox

Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (5 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp

    r83779 r85121  
    157157    void lwipInit();
    158158
    159     static err_t netifInitCB(netif *pNetif);
     159    static err_t netifInitCB(netif *pNetif) RT_NOTHROW_PROTO;
    160160    err_t netifInit(netif *pNetif);
    161161
    162     static err_t netifLinkOutputCB(netif *pNetif, pbuf *pPBuf);
     162    static err_t netifLinkOutputCB(netif *pNetif, pbuf *pPBuf) RT_NOTHROW_PROTO;
    163163    err_t netifLinkOutput(pbuf *pPBuf);
    164164
    165165    static void dhcp4RecvCB(void *arg, struct udp_pcb *pcb, struct pbuf *p,
    166                             ip_addr_t *addr, u16_t port);
     166                            ip_addr_t *addr, u16_t port) RT_NOTHROW_PROTO;
    167167    void dhcp4Recv(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port);
    168168};
     
    584584
    585585
    586 /* static */ err_t VBoxNetDhcpd::netifInitCB(netif *pNetif)
     586/* static */ err_t VBoxNetDhcpd::netifInitCB(netif *pNetif) RT_NOTHROW_DEF
    587587{
    588588    AssertPtrReturn(pNetif, ERR_ARG);
     
    593593
    594594
    595 /* static */ err_t VBoxNetDhcpd::netifLinkOutputCB(netif *pNetif, pbuf *pPBuf)
     595/* static */ err_t VBoxNetDhcpd::netifLinkOutputCB(netif *pNetif, pbuf *pPBuf) RT_NOTHROW_DEF
    596596{
    597597    AssertPtrReturn(pNetif, ERR_ARG);
     
    607607/* static */ void VBoxNetDhcpd::dhcp4RecvCB(void *arg, struct udp_pcb *pcb,
    608608                                            struct pbuf *p,
    609                                             ip_addr_t *addr, u16_t port)
     609                                            ip_addr_t *addr, u16_t port) RT_NOTHROW_DEF
    610610{
    611611    AssertPtrReturnVoid(arg);
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