Index: /trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp	(revision 104559)
+++ /trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp	(revision 104560)
@@ -420,5 +420,8 @@
     bufferFromPath((char *)pvBuf, cbToRead, g_testRTFileRead_pszData);
     if (pcbRead)
-        *pcbRead = RT_MIN(cbToRead, strlen(g_testRTFileRead_pszData) + 1);
+    {
+        size_t cchData = strlen(g_testRTFileRead_pszData) + 1;
+        *pcbRead = RT_MIN(cbToRead, cchData);
+    }
     g_testRTFileRead_pszData = 0;
     return VINF_SUCCESS;
@@ -433,5 +436,8 @@
     bufferFromPath((char *)pvBuf, cbToRead, g_testRTFileRead_pszData);
     if (pcbRead)
-        *pcbRead = RT_MIN(cbToRead, strlen(g_testRTFileRead_pszData) + 1);
+    {
+        size_t cchData = strlen(g_testRTFileRead_pszData) + 1;
+        *pcbRead = RT_MIN(cbToRead, cchData);
+    }
     g_testRTFileRead_pszData = 0;
     return VINF_SUCCESS;
@@ -688,5 +694,6 @@
 
     initTable(psvcTable, psvcHelpers);
-    AssertReleaseRC(VBoxHGCMSvcLoad(psvcTable));
+    rc = VBoxHGCMSvcLoad(psvcTable);
+    AssertReleaseRC(rc);
     AssertRelease(  psvcTable->pvService
                   = RTTestGuardedAllocTail(hTest, psvcTable->cbClient));
@@ -916,6 +923,8 @@
                      (hTest, "Result=%d\n", (int) Result));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile,
@@ -951,6 +960,8 @@
                      (hTest, "Result=%d\n", (int) Result));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile,
@@ -987,6 +998,8 @@
                      (hTest, "Result=%d\n", (int) Result));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTDirClose_hDir == hDir, (hTest, "hDir=%p\n", g_testRTDirClose_hDir));
@@ -1024,6 +1037,8 @@
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
 }
@@ -1058,6 +1073,8 @@
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
 }
@@ -1083,6 +1100,8 @@
     RTTEST_CHECK_MSG(hTest, g_testRTFileFlush_hFile == hFile, (hTest, "File=%u\n", g_testRTFileFlush_hFile));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
@@ -1117,6 +1136,8 @@
                      (hTest, "cFiles=%llu\n", LLUIFY(cFiles)));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTDirClose_hDir == hDir, (hTest, "hDir=%p\n", g_testRTDirClose_hDir));
@@ -1158,6 +1179,8 @@
                      (hTest, "Size=%llu\n", LLUIFY(g_testRTFileSet_fMode)));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
@@ -1201,6 +1224,8 @@
                       LLUIFY(RTTimeSpecGetNano(&g_testRTDirSetTimes_ATime))));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTDirClose_hDir == hDir, (hTest, "hDir=%p\n", g_testRTDirClose_hDir));
@@ -1244,6 +1269,8 @@
                       LLUIFY(RTTimeSpecGetNano(&g_testRTFileSetTimes_ATime))));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
@@ -1277,6 +1304,8 @@
                      (hTest, "Size=%llu\n", LLUIFY(g_testRTFileSetSize_cbSize)));
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
@@ -1323,6 +1352,8 @@
 #endif
     unmapAndRemoveMapping(hTest, &svcTable, Root, "testname");
-    AssertReleaseRC(svcTable.pfnDisconnect(NULL, 0, svcTable.pvService));
-    AssertReleaseRC(svcTable.pfnUnload(NULL));
+    rc = svcTable.pfnDisconnect(NULL, 0, svcTable.pvService);
+    AssertReleaseRC(rc);
+    rc = svcTable.pfnUnload(NULL);
+    AssertReleaseRC(rc);
     RTTestGuardedFree(hTest, svcTable.pvService);
     RTTEST_CHECK_MSG(hTest, g_testRTFileClose_hFile == hFile, (hTest, "File=%u\n", g_testRTFileClose_hFile));
