VirtualBox

Ignore:
Timestamp:
Aug 7, 2016 3:39:54 AM (8 years ago)
Author:
vboxsync
Message:

warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp

    r62876 r63123  
    116116*********************************************************************************************************************************/
    117117
    118 static PRTDIR testRTDirClosepDir;
     118static PRTDIR g_testRTDirClosepDir;
    119119
    120120extern int testRTDirClose(PRTDIR pDir)
    121121{
    122122 /* RTPrintf("%s: pDir=%p\n", __PRETTY_FUNCTION__, pDir); */
    123     testRTDirClosepDir = pDir;
     123    g_testRTDirClosepDir = pDir;
    124124    return VINF_SUCCESS;
    125125}
     
    159159}
    160160
    161 static PRTDIR testRTDirQueryInfoDir;
     161static PRTDIR g_testRTDirQueryInfoDir;
    162162static RTTIMESPEC testRTDirQueryInfoATime;
    163163
     
    167167 /* RTPrintf("%s: pDir=%p, enmAdditionalAttribs=0x%llx\n", __PRETTY_FUNCTION__,
    168168             pDir, LLUIFY(enmAdditionalAttribs)); */
    169     testRTDirQueryInfoDir = pDir;
     169    g_testRTDirQueryInfoDir = pDir;
    170170    RT_ZERO(*pObjInfo);
    171171    pObjInfo->AccessTime = testRTDirQueryInfoATime;
     
    181181}
    182182
    183 static PRTDIR testRTDirReadExDir;
     183static PRTDIR g_testRTDirReadExDir;
    184184
    185185extern int testRTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry,
     
    190190             __PRETTY_FUNCTION__, pDir, pcbDirEntry ? (int) *pcbDirEntry : -1,
    191191             LLUIFY(enmAdditionalAttribs), LLUIFY(fFlags)); */
    192     testRTDirReadExDir = pDir;
     192    g_testRTDirReadExDir = pDir;
    193193    return VERR_NO_MORE_FILES;
    194194}
     
    214214}
    215215
    216 static RTFILE testRTFileCloseFile;
     216static RTFILE g_testRTFileCloseFile;
    217217
    218218extern int  testRTFileClose(RTFILE File)
    219219{
    220220 /* RTPrintf("%s: File=%p\n", __PRETTY_FUNCTION__, File); */
    221     testRTFileCloseFile = File;
     221    g_testRTFileCloseFile = File;
    222222    return 0;
    223223}
     
    230230}
    231231
    232 static RTFILE testRTFileFlushFile;
     232static RTFILE g_testRTFileFlushFile;
    233233
    234234extern int  testRTFileFlush(RTFILE File)
    235235{
    236236 /* RTPrintf("%s: File=%p\n", __PRETTY_FUNCTION__, File); */
    237     testRTFileFlushFile = File;
    238     return VINF_SUCCESS;
    239 }
    240 
    241 static RTFILE testRTFileLockFile;
     237    g_testRTFileFlushFile = File;
     238    return VINF_SUCCESS;
     239}
     240
     241static RTFILE g_testRTFileLockFile;
    242242static unsigned testRTFileLockfLock;
    243243static int64_t testRTFileLockOffset;
     
    249249             __PRETTY_FUNCTION__, hFile, fLock, (long long) offLock,
    250250             LLUIFY(cbLock)); */
    251     testRTFileLockFile = hFile;
     251    g_testRTFileLockFile = hFile;
    252252    testRTFileLockfLock = fLock;
    253253    testRTFileLockOffset = offLock;
     
    271271}
    272272
    273 static RTFILE testRTFileQueryInfoFile;
     273static RTFILE g_testRTFileQueryInfoFile;
    274274static RTTIMESPEC testRTFileQueryInfoATime;
    275275static uint32_t testRTFileQueryInfoFMode;
     
    280280 /* RTPrintf("%s, hFile=%p, enmAdditionalAttribs=0x%llx\n",
    281281             __PRETTY_FUNCTION__, hFile, LLUIFY(enmAdditionalAttribs)); */
    282     testRTFileQueryInfoFile = hFile;
     282    g_testRTFileQueryInfoFile = hFile;
    283283    RT_ZERO(*pObjInfo);
    284284    pObjInfo->AccessTime = testRTFileQueryInfoATime;
     
    323323}
    324324
    325 static RTFILE testRTFileSetSizeFile;
     325static RTFILE g_testRTFileSetSizeFile;
    326326static RTFOFF testRTFileSetSizeSize;
    327327
     
    330330 /* RTPrintf("%s: File=%llu, cbSize=%llu\n", __PRETTY_FUNCTION__, LLUIFY(File),
    331331             LLUIFY(cbSize)); */
    332     testRTFileSetSizeFile = File;
     332    g_testRTFileSetSizeFile = File;
    333333    testRTFileSetSizeSize = (RTFOFF) cbSize; /* Why was this signed before? */
    334334    return VINF_SUCCESS;
     
    355355}
    356356
    357 static RTFILE testRTFileUnlockFile;
     357static RTFILE g_testRTFileUnlockFile;
    358358static int64_t testRTFileUnlockOffset;
    359359static uint64_t testRTFileUnlockSize;
     
    363363 /* RTPrintf("%s: hFile=%p, ofLock=%lli, cbLock=%llu\n", __PRETTY_FUNCTION__,
    364364             File, (long long) offLock, LLUIFY(cbLock)); */
    365     testRTFileUnlockFile = File;
     365    g_testRTFileUnlockFile = File;
    366366    testRTFileUnlockOffset = offLock;
    367367    testRTFileUnlockSize = cbLock;
     
    759759    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    760760    RTTestGuardedFree(hTest, svcTable.pvService);
    761     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    762                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     761    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile,
     762                     (hTest, "File=%u\n", (uintptr_t)g_testRTFileCloseFile));
    763763}
    764764
     
    790790    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    791791    RTTestGuardedFree(hTest, svcTable.pvService);
    792     RTTEST_CHECK_MSG(hTest,
    793                      testRTDirClosepDir == pcDir,
    794                      (hTest, "pDir=%llu\n", LLUIFY(testRTDirClosepDir)));
     792    RTTEST_CHECK_MSG(hTest, g_testRTDirClosepDir == pcDir, (hTest, "pDir=%p\n", g_testRTDirClosepDir));
    795793}
    796794
     
    824822                     (hTest, "cbRead=%llu\n", LLUIFY(cbRead)));
    825823    unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
    826     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    827                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     824    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
    828825    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    829826    RTTestGuardedFree(hTest, svcTable.pvService);
     
    858855                     (hTest, "cbWritten=%llu\n", LLUIFY(cbWritten)));
    859856    unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
    860     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    861                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     857    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
    862858    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    863859    RTTestGuardedFree(hTest, svcTable.pvService);
     
    882878    rc = flushFile(&svcTable, Root, Handle);
    883879    RTTEST_CHECK_RC_OK(hTest, rc);
    884     RTTEST_CHECK_MSG(hTest, testRTFileFlushFile == hcFile,
    885                      (hTest, "File=%llu\n", LLUIFY(testRTFileFlushFile)));
     880    RTTEST_CHECK_MSG(hTest, g_testRTFileFlushFile == hcFile, (hTest, "File=%u\n", g_testRTFileFlushFile));
    886881    unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
    887882    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    888883    RTTestGuardedFree(hTest, svcTable.pvService);
    889     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    890                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     884    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
    891885}
    892886
     
    912906                 &DirInfo, sizeof(DirInfo), 0, &cFiles);
    913907    RTTEST_CHECK_RC(hTest, rc, VERR_NO_MORE_FILES);
    914     RTTEST_CHECK_MSG(hTest, testRTDirReadExDir == pcDir,
    915                      (hTest, "Dir=%llu\n", LLUIFY(testRTDirReadExDir)));
     908    RTTEST_CHECK_MSG(hTest, g_testRTDirReadExDir == pcDir, (hTest, "Dir=%p\n", g_testRTDirReadExDir));
    916909    RTTEST_CHECK_MSG(hTest, cFiles == 0,
    917910                     (hTest, "cFiles=%llu\n", LLUIFY(cFiles)));
     
    919912    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    920913    RTTestGuardedFree(hTest, svcTable.pvService);
    921     RTTEST_CHECK_MSG(hTest,
    922                      testRTDirClosepDir == pcDir,
    923                      (hTest, "pDir=%llu\n", LLUIFY(testRTDirClosepDir)));
     914    RTTEST_CHECK_MSG(hTest, g_testRTDirClosepDir == pcDir, (hTest, "pDir=%p\n", g_testRTDirClosepDir));
    924915}
    925916
     
    947938                       &Info);
    948939    RTTEST_CHECK_RC_OK(hTest, rc);
    949     RTTEST_CHECK_MSG(hTest, testRTFileQueryInfoFile == hcFile,
    950                      (hTest, "File=%llu\n", LLUIFY(testRTFileQueryInfoFile)));
     940    RTTEST_CHECK_MSG(hTest, g_testRTFileQueryInfoFile == hcFile, (hTest, "File=%u\n", g_testRTFileQueryInfoFile));
    951941    RTTEST_CHECK_MSG(hTest, Info.Attr.fMode == fMode,
    952942                     (hTest, "cbObject=%llu\n", LLUIFY(Info.cbObject)));
     
    961951    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    962952    RTTestGuardedFree(hTest, svcTable.pvService);
    963     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    964                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     953    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
    965954}
    966955
     
    988977                       &Info);
    989978    RTTEST_CHECK_RC_OK(hTest, rc);
    990     RTTEST_CHECK_MSG(hTest, testRTDirQueryInfoDir == pcDir,
    991                      (hTest, "Dir=%llu\n", LLUIFY(testRTDirQueryInfoDir)));
     979    RTTEST_CHECK_MSG(hTest, g_testRTDirQueryInfoDir == pcDir, (hTest, "Dir=%p\n", g_testRTDirQueryInfoDir));
    992980    RTTEST_CHECK_MSG(hTest, RTTimeSpecGetNano(&Info.AccessTime) == ccAtimeNano,
    993981                     (hTest, "ATime=%llu\n",
     
    1005993    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    1006994    RTTestGuardedFree(hTest, svcTable.pvService);
    1007     RTTEST_CHECK_MSG(hTest, testRTDirClosepDir == pcDir,
    1008                      (hTest, "File=%llu\n", LLUIFY(testRTDirClosepDir)));
     995    RTTEST_CHECK_MSG(hTest, g_testRTDirClosepDir == pcDir, (hTest, "pDir=%p\n", g_testRTDirClosepDir));
    1009996}
    1010997
     
    10321019                       &Info);
    10331020    RTTEST_CHECK_RC_OK(hTest, rc);
    1034     RTTEST_CHECK_MSG(hTest, testRTFileQueryInfoFile == hcFile,
    1035                      (hTest, "File=%llu\n", LLUIFY(testRTFileQueryInfoFile)));
     1021    RTTEST_CHECK_MSG(hTest, g_testRTFileQueryInfoFile == hcFile, (hTest, "File=%u\n", g_testRTFileQueryInfoFile));
    10361022    RTTEST_CHECK_MSG(hTest, RTTimeSpecGetNano(&Info.AccessTime) == ccAtimeNano,
    10371023                     (hTest, "ATime=%llu\n",
     
    10491035    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    10501036    RTTestGuardedFree(hTest, svcTable.pvService);
    1051     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    1052                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     1037    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
    10531038}
    10541039
     
    10761061                       sizeof(Info), &Info);
    10771062    RTTEST_CHECK_RC_OK(hTest, rc);
    1078     RTTEST_CHECK_MSG(hTest, testRTFileSetSizeFile == hcFile,
    1079                      (hTest, "File=%llu\n", LLUIFY(testRTFileSetSizeFile)));
     1063    RTTEST_CHECK_MSG(hTest, g_testRTFileSetSizeFile == hcFile, (hTest, "File=%u\n", g_testRTFileSetSizeFile));
    10801064    RTTEST_CHECK_MSG(hTest, testRTFileSetSizeSize == cbNew,
    10811065                     (hTest, "Size=%llu\n", LLUIFY(testRTFileSetSizeSize)));
     
    10831067    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    10841068    RTTestGuardedFree(hTest, svcTable.pvService);
    1085     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    1086                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     1069    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
    10871070}
    10881071
     
    11081091    RTTEST_CHECK_RC_OK(hTest, rc);
    11091092#ifdef RT_OS_WINDOWS  /* Locking is a no-op elsewhere. */
    1110     RTTEST_CHECK_MSG(hTest, testRTFileLockFile == hcFile,
    1111                      (hTest, "File=%llu\n", LLUIFY(testRTFileLockFile)));
     1093    RTTEST_CHECK_MSG(hTest, g_testRTFileLockFile == hcFile, (hTest, "File=%u\n", g_testRTFileLockFile));
    11121094    RTTEST_CHECK_MSG(hTest, testRTFileLockfLock == 0,
    11131095                     (hTest, "fLock=%u\n", testRTFileLockfLock));
     
    11201102    RTTEST_CHECK_RC_OK(hTest, rc);
    11211103#ifdef RT_OS_WINDOWS
    1122     RTTEST_CHECK_MSG(hTest, testRTFileUnlockFile == hcFile,
    1123                      (hTest, "File=%llu\n", LLUIFY(testRTFileUnlockFile)));
     1104    RTTEST_CHECK_MSG(hTest, g_testRTFileUnlockFile == hcFile, (hTest, "File=%u\n", g_testRTFileUnlockFile));
    11241105    RTTEST_CHECK_MSG(hTest, testRTFileUnlockOffset == offLock,
    11251106                     (hTest, "Offs=%llu\n",
     
    11311112    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
    11321113    RTTestGuardedFree(hTest, svcTable.pvService);
    1133     RTTEST_CHECK_MSG(hTest, testRTFileCloseFile == hcFile,
    1134                      (hTest, "File=%llu\n", LLUIFY(testRTFileCloseFile)));
     1114    RTTEST_CHECK_MSG(hTest, g_testRTFileCloseFile == hcFile, (hTest, "File=%u\n", g_testRTFileCloseFile));
    11351115}
    11361116
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