VirtualBox

Changeset 23315 in vbox for trunk


Ignore:
Timestamp:
Sep 25, 2009 1:40:08 AM (15 years ago)
Author:
vboxsync
Message:

VBox/hgcmsvc.h,GuestProperties/service.cpp: gcc 4.0.1 warnings.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/hgcmsvc.h

    r21669 r23315  
    202202        int rc = getBuffer((void **)&pch, &cb);
    203203        if (RT_FAILURE(rc))
     204        {
     205            *ppch = NULL;
     206            *pcb = 0;
    204207            return rc;
     208        }
    205209        rc = RTStrValidateEncodingEx(pch, cb,
    206210                                     RTSTR_VALIDATE_ENCODING_ZERO_TERMINATED);
  • trunk/src/VBox/HostServices/GuestProperties/service.cpp

    r21629 r23315  
    509509{
    510510    int rc = VINF_SUCCESS;
    511     const char *pcszName;
     511    const char *pcszName = NULL;        /* shut up gcc */
    512512    char *pchBuf;
    513513    uint32_t cchName, cchBuf;
     
    585585{
    586586    int rc = VINF_SUCCESS;
    587     const char *pcszName, *pcszValue, *pcszFlags = NULL;
     587    const char *pcszName = NULL;        /* shut up gcc */
     588    const char *pcszValue = NULL;       /* ditto */
     589    const char *pcszFlags = NULL;
    588590    uint32_t cchName, cchValue, cchFlags = 0;
    589591    uint32_t fFlags = NILFLAG;
     
    687689{
    688690    int rc = VINF_SUCCESS;
    689     const char *pcszName;
     691    const char *pcszName = NULL;        /* shut up gcc */
    690692    uint32_t cbName;
    691693
     
    695697     * Check the user-supplied parameters.
    696698     */
    697     if (   (cParms != 1)  /* Hardcoded value as the next lines depend on it. */
    698         || RT_FAILURE(paParms[0].getString(&pcszName, &cbName))  /* name */
     699    if (   (cParms == 1)  /* Hardcoded value as the next lines depend on it. */
     700        && RT_SUCCESS(paParms[0].getString(&pcszName, &cbName))  /* name */
    699701       )
     702        rc = validateName(pcszName, cbName);
     703    else
    700704        rc = VERR_INVALID_PARAMETER;
    701     if (RT_SUCCESS(rc))
    702         rc = validateName(pcszName, cbName);
    703705
    704706    /*
     
    901903{
    902904    int rc = VINF_SUCCESS;
    903     char *pszPatterns, *pchBuf;
    904     uint32_t cchPatterns = 0, cchBuf = 0;
     905    char *pszPatterns = NULL;           /* shut up gcc */
     906    char *pchBuf;
     907    uint32_t cchPatterns = 0;
     908    uint32_t cchBuf = 0;
    905909    uint64_t u64Timestamp;
    906910
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