Changeset 17739 in vbox
- Timestamp:
- Mar 12, 2009 12:38:15 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44256
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r17684 r17739 1129 1129 CHECK_ERROR_RET (USBCtl, COMGETTER(DeviceFilters)(ComSafeArrayAsOutParam(Coll)), rc); 1130 1130 1131 size_t index = 0; // Also used after the "for" below.1132 1133 1131 if (Coll.size() == 0) 1134 1132 { … … 1138 1136 else 1139 1137 { 1140 for ( ; index < Coll.size(); ++index)1138 for (size_t index = 0; index < Coll.size(); ++index) 1141 1139 { 1142 1140 ComPtr<IUSBDeviceFilter> DevPtr = Coll[index]; … … 1208 1206 if (console) 1209 1207 { 1210 index = 0;1211 1208 /* scope */ 1212 1209 { … … 1224 1221 else 1225 1222 { 1226 for ( index = 0; index < coll.size(); ++index)1223 for (size_t index = 0; index < coll.size(); ++index) 1227 1224 { 1228 1225 ComPtr <IHostUSBDevice> dev = coll[index]; … … 1298 1295 } 1299 1296 1300 index = 0;1301 1297 /* scope */ 1302 1298 { … … 1314 1310 else 1315 1311 { 1316 for ( index = 0; index < coll.size(); ++index)1312 for (size_t index = 0; index < coll.size(); ++index) 1317 1313 { 1318 1314 ComPtr <IUSBDevice> dev = coll[index]; … … 1399 1395 /* globally shared folders first */ 1400 1396 { 1401 ComPtr<ISharedFolderCollection> sfColl; 1402 ComPtr<ISharedFolderEnumerator> sfEnum; 1403 CHECK_ERROR_RET(virtualBox, COMGETTER(SharedFolders)(sfColl.asOutParam()), rc); 1404 CHECK_ERROR_RET(sfColl, Enumerate(sfEnum.asOutParam()), rc); 1405 BOOL fMore; 1406 sfEnum->HasMore(&fMore); 1407 while (fMore) 1408 { 1409 ComPtr<ISharedFolder> sf; 1410 CHECK_ERROR_RET(sfEnum, GetNext(sf.asOutParam()), rc); 1397 SafeIfaceArray <ISharedFolder> sfColl; 1398 CHECK_ERROR_RET(virtualBox, COMGETTER(SharedFolders)(ComSafeArrayAsOutParam(sfColl)), rc); 1399 for (size_t i = 0; i < sfColl.size(); ++i) 1400 { 1401 ComPtr<ISharedFolder> sf = sfColl[i]; 1411 1402 Bstr name, hostPath; 1412 1403 sf->COMGETTER(Name)(name.asOutParam()); … … 1414 1405 RTPrintf("Name: '%lS', Host path: '%lS' (global mapping)\n", name.raw(), hostPath.raw()); 1415 1406 ++numSharedFolders; 1416 CHECK_ERROR_RET(sfEnum, HasMore(&fMore), rc);1417 1407 } 1418 1408 }
Note:
See TracChangeset
for help on using the changeset viewer.