VirtualBox

Changeset 7428 in vbox for trunk


Ignore:
Timestamp:
Mar 12, 2008 9:58:58 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28863
Message:

Use explicit initialization of all members and not lazy {0}.

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp

    r7411 r7428  
    3838VBGLR3DECL(int) VbglR3ClipboardConnect(uint32_t *pu32ClientId)
    3939{
    40     VBoxGuestHGCMConnectInfo Info = { 0 };
    41 
     40    VBoxGuestHGCMConnectInfo Info;
    4241    Info.result = (uint32_t)VERR_WRONG_ORDER; /** @todo drop the cast when the result type has been fixed! */
    4342    Info.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
    44     // memset(&Info.Loc.u, 0, sizeof(Info.Loc.u));
     43    memset(&Info.Loc.u, 0, sizeof(Info.Loc.u));
    4544    strcpy(Info.Loc.u.host.achName, "VBoxSharedClipboard");
     45    Info.u32ClientID = UINT32_MAX;  /* try make valgrid shut up. */
    4646
    4747    int rc = vbglR3DoIOCtl(IOCTL_VBOXGUEST_HGCM_CONNECT, &Info, sizeof(Info));
     
    8787VBGLR3DECL(int) VbglR3ClipboardGetHostMsg(uint32_t u32ClientId, uint32_t *pMsg, uint32_t *pfFormats)
    8888{
    89     VBoxClipboardGetHostMsg Msg = { 0 };
     89    VBoxClipboardGetHostMsg Msg;
    9090
    9191    Msg.hdr.result = (uint32_t)VERR_WRONG_ORDER;  /** @todo drop the cast when the result type has been fixed! */
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp

    r7411 r7428  
    6565VBGLR3DECL(int) VbglR3SeamlessWaitEvent(VMMDevSeamlessMode *pMode)
    6666{
    67     VBoxGuestWaitEventInfo waitEvent = { 0 };
     67    VBoxGuestWaitEventInfo waitEvent;
    6868    int rc;
    6969
     
    7171    waitEvent.u32TimeoutIn = RT_INDEFINITE_WAIT;
    7272    waitEvent.u32EventMaskIn = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
     73    waitEvent.u32Result = VBOXGUEST_WAITEVENT_ERROR;
     74    waitEvent.u32EventFlagsOut = 0;
    7375    rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent));
    7476    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp

    r7411 r7428  
    163163                                             uint32_t *piDisplay)
    164164{
    165     VBoxGuestWaitEventInfo waitEvent = { 0 };
     165    VBoxGuestWaitEventInfo waitEvent;
    166166    int rc;
    167167
     
    174174    waitEvent.u32TimeoutIn = RT_INDEFINITE_WAIT;
    175175    waitEvent.u32EventMaskIn = VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST;
     176    waitEvent.u32Result = VBOXGUEST_WAITEVENT_ERROR;
     177    waitEvent.u32EventFlagsOut = 0;
    176178    rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent));
    177179    if (RT_SUCCESS(rc))
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette