VirtualBox

Ignore:
Timestamp:
Aug 1, 2016 7:21:13 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109379
Message:

HostServices: warnings

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp

    r62679 r62792  
    10911091
    10921092/*
    1093 * Converts clipboard data from CF_HTML format to mimie clipboard format
    1094 * Returns allocated buffer that contains html converted to text/html mime type
    1095 * return result code
    1096 * parameters - output buffer and size of output buffer
    1097 * It allocates the buffer needed for storing converted fragment
    1098 * Allocated buffer should be destroyed by RTMemFree after usage
    1099 */
    1100 int ConvertCFHtmlToMime(const char *pcszSource, const uint32_t cch, char **ppszOutput, size_t *pcCh)
     1093 * Converts clipboard data from CF_HTML format to mimie clipboard format
     1094 * Returns allocated buffer that contains html converted to text/html mime type
     1095 * return result code
     1096 * parameters - output buffer and size of output buffer
     1097 * It allocates the buffer needed for storing converted fragment
     1098 * Allocated buffer should be destroyed by RTMemFree after usage
     1099 */
     1100int ConvertCFHtmlToMime(const char *pcszSource, const uint32_t cch, char **ppszOutput, size_t *pcch)
    11011101{
    11021102    char* result = NULL;
     
    11051105    Assert(cch);
    11061106    Assert(ppszOutput);
    1107     Assert(pcCh);
     1107    Assert(pcch);
    11081108
    11091109    size_t cStartOffset, cEndOffset;
     
    11231123    {
    11241124        size_t cSubstrlen = cEndOffset - cStartOffset;
    1125         result = (char*)RTMemAlloc(cSubstrlen + 1);
     1125        result = (char *)RTMemAlloc(cSubstrlen + 1);
    11261126        if (result)
    11271127        {
     
    11311131            {
    11321132                *ppszOutput = result;
    1133                 *pcCh = cSubstrlen + 1;
     1133                *pcch = cSubstrlen + 1;
    11341134            }
    11351135            else
     
    11671167* @note: Everything inside of fragment can be UTF8. Windows allows it. Everything in header should be Latin1.
    11681168*/
    1169 int ConvertMimeToCFHTML(const char *pcszSource, size_t cb, char **pcszOutput, size_t *pcCh)
    1170 {
    1171     Assert(pcszOutput);
    1172     Assert(pcCh);
     1169int ConvertMimeToCFHTML(const char *pcszSource, size_t cb, char **pszOutput, size_t *pcch)
     1170{
     1171    Assert(pszOutput);
     1172    Assert(pcch);
    11731173    Assert(pcszSource);
    11741174    Assert(cb);
     
    12231223#endif
    12241224
    1225     *pcszOutput = pszResult;
    1226     *pcCh = rc+1;
     1225    *pszOutput = pszResult;
     1226    *pcch = rc + 1;
    12271227
    12281228    return VINF_SUCCESS;
  • trunk/src/VBox/HostServices/SharedClipboard/service.cpp

    r62489 r62792  
    780780    int rc = SSMR3PutStructEx (pSSM, pClient, sizeof(*pClient), 0 /*fFlags*/, &g_aClipboardClientDataFields[0], NULL);
    781781    AssertRCReturn (rc, rc);
    782 #endif /* !UNIT_TEST */
     782
     783#else  /* UNIT_TEST */
     784    RT_NOREF3(u32ClientID, pvClient, pSSM);
     785#endif /* UNIT_TEST */
    783786    return VINF_SUCCESS;
    784787}
     
    849852        AssertRCReturn (rc, rc);
    850853    }
    851     else if (lenOrVer == (SSMR3HandleHostBits (pSSM) == 64 ? 72 : 48))
     854    else if (lenOrVer == (SSMR3HandleHostBits (pSSM) == 64 ? 72U : 48U))
    852855    {
    853856        /**
     
    899902    vboxClipboardSync (pClient);
    900903
    901 #endif /* !UNIT_TEST */
     904#else  /* UNIT_TEST*/
     905    RT_NOREF3(u32ClientID, pvClient, pSSM);
     906#endif /* UNIT_TEST */
    902907    return VINF_SUCCESS;
    903908}
     
    905910static DECLCALLBACK(int) extCallback (uint32_t u32Function, uint32_t u32Format, void *pvData, uint32_t cbData)
    906911{
     912    RT_NOREF2(pvData, cbData);
    907913    if (g_pClient != NULL)
    908914    {
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