Changeset 65642 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Feb 7, 2017 11:28:56 AM (8 years ago)
- Location:
- trunk/src/VBox/Runtime/common
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asn1/asn1-ut-integer-decode.cpp
r62477 r65642 53 53 { 54 54 default: 55 case 8: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 7] << 56; 56 case 7: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 6] << 48; 57 case 6: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 5] << 40; 58 case 5: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 4] << 32; 59 case 4: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 3] << 24; 60 case 3: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 2] << 16; 61 case 2: pThis->uValue.u |= (uint16_t)pThis->Asn1Core.uData.pu8[offLast - 1] << 8;55 case 8: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 7] << 56; /* fall thru */ 56 case 7: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 6] << 48; /* fall thru */ 57 case 6: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 5] << 40; /* fall thru */ 58 case 5: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 4] << 32; /* fall thru */ 59 case 4: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 3] << 24; /* fall thru */ 60 case 3: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 2] << 16; /* fall thru */ 61 case 2: pThis->uValue.u |= (uint16_t)pThis->Asn1Core.uData.pu8[offLast - 1] << 8; /* fall thru */ 62 62 case 1: pThis->uValue.u |= pThis->Asn1Core.uData.pu8[offLast]; 63 63 } -
trunk/src/VBox/Runtime/common/asn1/asn1-ut-integer.cpp
r62564 r65642 68 68 { 69 69 default: 70 case 8: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 7] << 56; 71 case 7: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 6] << 48; 72 case 6: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 5] << 40; 73 case 5: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 4] << 32; 74 case 4: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 3] << 24; 75 case 3: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 2] << 16; 76 case 2: pThis->uValue.u |= (uint16_t)pThis->Asn1Core.uData.pu8[offLast - 1] << 8;70 case 8: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 7] << 56; /* fall thru */ 71 case 7: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 6] << 48; /* fall thru */ 72 case 6: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 5] << 40; /* fall thru */ 73 case 5: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 4] << 32; /* fall thru */ 74 case 4: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 3] << 24; /* fall thru */ 75 case 3: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 2] << 16; /* fall thru */ 76 case 2: pThis->uValue.u |= (uint16_t)pThis->Asn1Core.uData.pu8[offLast - 1] << 8; /* fall thru */ 77 77 case 1: pThis->uValue.u |= pThis->Asn1Core.uData.pu8[offLast]; 78 78 } -
trunk/src/VBox/Runtime/common/math/bignum.cpp
r63451 r65642 677 677 default: AssertFailed(); 678 678 #if RTBIGNUM_ELEMENT_SIZE == 8 679 case 7: uLast = (uLast << 8) | pb[6]; 680 case 6: uLast = (uLast << 8) | pb[5]; 681 case 5: uLast = (uLast << 8) | pb[4]; 679 case 7: uLast = (uLast << 8) | pb[6]; /* fall thru */ 680 case 6: uLast = (uLast << 8) | pb[5]; /* fall thru */ 681 case 5: uLast = (uLast << 8) | pb[4]; /* fall thru */ 682 682 case 4: uLast = (uLast << 8) | pb[3]; 683 683 #endif 684 case 3: uLast = (uLast << 8) | pb[2]; 685 case 2: uLast = (uLast << 8) | pb[1]; 684 /* fall thru */ 685 case 3: uLast = (uLast << 8) | pb[2]; /* fall thru */ 686 case 2: uLast = (uLast << 8) | pb[1]; /* fall thru */ 686 687 case 1: uLast = (uLast << 8) | pb[0]; 687 688 } … … 714 715 default: AssertFailed(); 715 716 #if RTBIGNUM_ELEMENT_SIZE == 8 716 case 7: uLast = (uLast << 8) | *pb++; 717 case 6: uLast = (uLast << 8) | *pb++; 718 case 5: uLast = (uLast << 8) | *pb++; 717 case 7: uLast = (uLast << 8) | *pb++; /* fall thru */ 718 case 6: uLast = (uLast << 8) | *pb++; /* fall thru */ 719 case 5: uLast = (uLast << 8) | *pb++; /* fall thru */ 719 720 case 4: uLast = (uLast << 8) | *pb++; 720 721 #endif 721 case 3: uLast = (uLast << 8) | *pb++; 722 case 2: uLast = (uLast << 8) | *pb++; 722 /* fall thru */ 723 case 3: uLast = (uLast << 8) | *pb++; /* fall thru */ 724 case 2: uLast = (uLast << 8) | *pb++; /* fall thru */ 723 725 case 1: uLast = (uLast << 8) | *pb++; 724 726 } … … 747 749 { 748 750 default: AssertFailed(); 749 case 3: *puUnused++ = 0; 750 case 2: *puUnused++ = 0; 751 case 3: *puUnused++ = 0; /* fall thru */ 752 case 2: *puUnused++ = 0; /* fall thru */ 751 753 case 1: *puUnused++ = 0; 752 754 } -
trunk/src/VBox/Runtime/common/misc/getoptargv.cpp
r62477 r65642 158 158 switch (cchSeparators) 159 159 { 160 case 8: if (ch == pszSeparators[7]) return true; 161 case 7: if (ch == pszSeparators[6]) return true; 162 case 6: if (ch == pszSeparators[5]) return true; 163 case 5: if (ch == pszSeparators[4]) return true; 164 case 4: if (ch == pszSeparators[3]) return true; 165 case 3: if (ch == pszSeparators[2]) return true; 166 case 2: if (ch == pszSeparators[1]) return true; 160 case 8: if (ch == pszSeparators[7]) return true; /* fall thru */ 161 case 7: if (ch == pszSeparators[6]) return true; /* fall thru */ 162 case 6: if (ch == pszSeparators[5]) return true; /* fall thru */ 163 case 5: if (ch == pszSeparators[4]) return true; /* fall thru */ 164 case 4: if (ch == pszSeparators[3]) return true; /* fall thru */ 165 case 3: if (ch == pszSeparators[2]) return true; /* fall thru */ 166 case 2: if (ch == pszSeparators[1]) return true; /* fall thru */ 167 167 case 1: if (ch == pszSeparators[0]) return true; 168 168 return false; -
trunk/src/VBox/Runtime/common/misc/lockvalidator.cpp
r63678 r65642 4284 4284 if (!pRec || pRec->Core.u32Magic != RTLOCKVALRECSHRD_MAGIC) 4285 4285 break; 4286 /* fall thru */ 4286 4287 case RTLOCKVALRECSHRD_MAGIC: 4287 4288 pvLock = pRec->Shared.hLock; -
trunk/src/VBox/Runtime/common/rand/randadv.cpp
r62477 r65642 222 222 { 223 223 case 4: 224 pb[3] = (uint8_t)(u32 >> 24); 224 pb[3] = (uint8_t)(u32 >> 24); /* fall thru */ 225 225 case 3: 226 pb[2] = (uint8_t)(u32 >> 16); 226 pb[2] = (uint8_t)(u32 >> 16); /* fall thru */ 227 227 case 2: 228 pb[1] = (uint8_t)(u32 >> 8); 228 pb[1] = (uint8_t)(u32 >> 8); /* fall thru */ 229 229 case 1: 230 230 pb[0] = (uint8_t)u32; … … 254 254 { 255 255 case 8: 256 pb[7] = (uint8_t)(u64 >> 56); 256 pb[7] = (uint8_t)(u64 >> 56); /* fall thru */ 257 257 case 7: 258 pb[6] = (uint8_t)(u64 >> 48); 258 pb[6] = (uint8_t)(u64 >> 48); /* fall thru */ 259 259 case 6: 260 pb[5] = (uint8_t)(u64 >> 40); 260 pb[5] = (uint8_t)(u64 >> 40); /* fall thru */ 261 261 case 5: 262 pb[4] = (uint8_t)(u64 >> 32); 262 pb[4] = (uint8_t)(u64 >> 32); /* fall thru */ 263 263 case 4: 264 pb[3] = (uint8_t)(u64 >> 24); 264 pb[3] = (uint8_t)(u64 >> 24); /* fall thru */ 265 265 case 3: 266 pb[2] = (uint8_t)(u64 >> 16); 266 pb[2] = (uint8_t)(u64 >> 16); /* fall thru */ 267 267 case 2: 268 pb[1] = (uint8_t)(u64 >> 8); 268 pb[1] = (uint8_t)(u64 >> 8); /* fall thru */ 269 269 case 1: 270 270 pb[0] = (uint8_t)u64; -
trunk/src/VBox/Runtime/common/string/strformat.cpp
r63561 r65642 659 659 case 'X': 660 660 fFlags |= RTSTR_F_CAPITAL; 661 /* fall thru */ 661 662 case 'x': 662 663 uBase = 16; -
trunk/src/VBox/Runtime/common/string/strformatrt.cpp
r62892 r65642 83 83 switch (cDigits) 84 84 { 85 case 4: pszDst[off++] = g_szHexDigits[(uWord >> 12) & 0xf]; 86 case 3: pszDst[off++] = g_szHexDigits[(uWord >> 8) & 0xf]; 87 case 2: pszDst[off++] = g_szHexDigits[(uWord >> 4) & 0xf]; 85 case 4: pszDst[off++] = g_szHexDigits[(uWord >> 12) & 0xf]; /* fall thru */ 86 case 3: pszDst[off++] = g_szHexDigits[(uWord >> 8) & 0xf]; /* fall thru */ 87 case 2: pszDst[off++] = g_szHexDigits[(uWord >> 4) & 0xf]; /* fall thru */ 88 88 case 1: pszDst[off++] = g_szHexDigits[(uWord >> 0) & 0xf]; 89 89 break; -
trunk/src/VBox/Runtime/common/string/strprintf.cpp
r64343 r65642 80 80 memcpy(pszCur, pachChars, cbChars); 81 81 break; 82 case 8: pszCur[7] = pachChars[7]; 83 case 7: pszCur[6] = pachChars[6]; 84 case 6: pszCur[5] = pachChars[5]; 85 case 5: pszCur[4] = pachChars[4]; 86 case 4: pszCur[3] = pachChars[3]; 87 case 3: pszCur[2] = pachChars[2]; 88 case 2: pszCur[1] = pachChars[1]; 89 case 1: pszCur[0] = pachChars[0]; 82 case 8: pszCur[7] = pachChars[7]; /* fall thru */ 83 case 7: pszCur[6] = pachChars[6]; /* fall thru */ 84 case 6: pszCur[5] = pachChars[5]; /* fall thru */ 85 case 5: pszCur[4] = pachChars[4]; /* fall thru */ 86 case 4: pszCur[3] = pachChars[3]; /* fall thru */ 87 case 3: pszCur[2] = pachChars[2]; /* fall thru */ 88 case 2: pszCur[1] = pachChars[1]; /* fall thru */ 89 case 1: pszCur[0] = pachChars[0]; /* fall thru */ 90 90 case 0: 91 91 break; -
trunk/src/VBox/Runtime/common/string/strprintf2.cpp
r64340 r65642 76 76 memcpy(pszCur, pachChars, cbChars); 77 77 break; 78 case 8: pszCur[7] = pachChars[7]; 79 case 7: pszCur[6] = pachChars[6]; 80 case 6: pszCur[5] = pachChars[5]; 81 case 5: pszCur[4] = pachChars[4]; 82 case 4: pszCur[3] = pachChars[3]; 83 case 3: pszCur[2] = pachChars[2]; 84 case 2: pszCur[1] = pachChars[1]; 85 case 1: pszCur[0] = pachChars[0]; 78 case 8: pszCur[7] = pachChars[7]; /* fall thru */ 79 case 7: pszCur[6] = pachChars[6]; /* fall thru */ 80 case 6: pszCur[5] = pachChars[5]; /* fall thru */ 81 case 5: pszCur[4] = pachChars[4]; /* fall thru */ 82 case 4: pszCur[3] = pachChars[3]; /* fall thru */ 83 case 3: pszCur[2] = pachChars[2]; /* fall thru */ 84 case 2: pszCur[1] = pachChars[1]; /* fall thru */ 85 case 1: pszCur[0] = pachChars[0]; /* fall thru */ 86 86 case 0: 87 87 break; -
trunk/src/VBox/Runtime/common/string/utf-8.cpp
r64633 r65642 94 94 case 6: 95 95 RTStrAssertMsgReturn((puch[5] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("6/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 96 /* fall thru */ 96 97 case 5: 97 98 RTStrAssertMsgReturn((puch[4] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("5/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 99 /* fall thru */ 98 100 case 4: 99 101 RTStrAssertMsgReturn((puch[3] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("4/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 102 /* fall thru */ 100 103 case 3: 101 104 RTStrAssertMsgReturn((puch[2] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("3/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 105 /* fall thru */ 102 106 case 2: 103 107 RTStrAssertMsgReturn((puch[1] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("2/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); … … 602 606 case 6: 603 607 RTStrAssertMsgReturn((puch[5] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("6/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 608 /* fall thru */ 604 609 case 5: 605 610 RTStrAssertMsgReturn((puch[4] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("5/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 611 /* fall thru */ 606 612 case 4: 607 613 RTStrAssertMsgReturn((puch[3] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("4/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 614 /* fall thru */ 608 615 case 3: 609 616 RTStrAssertMsgReturn((puch[2] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("3/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); 617 /* fall thru */ 610 618 case 2: 611 619 RTStrAssertMsgReturn((puch[1] & (RT_BIT(7) | RT_BIT(6))) == RT_BIT(7), ("2/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, cch), puch), VERR_INVALID_UTF8_ENCODING); … … 1478 1486 RTStrAssertMsgReturn((puch[5] & 0xc0) == 0x80, ("6/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1479 1487 rtStrGetCpExFailure(ppsz, pCp, VERR_INVALID_UTF8_ENCODING)); 1488 /* fall thru */ 1480 1489 case 5: 1481 1490 RTStrAssertMsgReturn((puch[4] & 0xc0) == 0x80, ("5/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1482 1491 rtStrGetCpExFailure(ppsz, pCp, VERR_INVALID_UTF8_ENCODING)); 1492 /* fall thru */ 1483 1493 case 4: 1484 1494 RTStrAssertMsgReturn((puch[3] & 0xc0) == 0x80, ("4/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1485 1495 rtStrGetCpExFailure(ppsz, pCp, VERR_INVALID_UTF8_ENCODING)); 1496 /* fall thru */ 1486 1497 case 3: 1487 1498 RTStrAssertMsgReturn((puch[2] & 0xc0) == 0x80, ("3/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1488 1499 rtStrGetCpExFailure(ppsz, pCp, VERR_INVALID_UTF8_ENCODING)); 1500 /* fall thru */ 1489 1501 case 2: 1490 1502 RTStrAssertMsgReturn((puch[1] & 0xc0) == 0x80, ("2/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), … … 1633 1645 RTStrAssertMsgReturn((puch[5] & 0xc0) == 0x80, ("6/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1634 1646 rtStrGetCpNExFailure(ppsz, pcch, pCp, VERR_INVALID_UTF8_ENCODING)); 1647 /* fall thru */ 1635 1648 case 5: 1636 1649 RTStrAssertMsgReturn((puch[4] & 0xc0) == 0x80, ("5/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1637 1650 rtStrGetCpNExFailure(ppsz, pcch, pCp, VERR_INVALID_UTF8_ENCODING)); 1651 /* fall thru */ 1638 1652 case 4: 1639 1653 RTStrAssertMsgReturn((puch[3] & 0xc0) == 0x80, ("4/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1640 1654 rtStrGetCpNExFailure(ppsz, pcch, pCp, VERR_INVALID_UTF8_ENCODING)); 1655 /* fall thru */ 1641 1656 case 3: 1642 1657 RTStrAssertMsgReturn((puch[2] & 0xc0) == 0x80, ("3/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch), 1643 1658 rtStrGetCpNExFailure(ppsz, pcch, pCp, VERR_INVALID_UTF8_ENCODING)); 1659 /* fall thru */ 1644 1660 case 2: 1645 1661 RTStrAssertMsgReturn((puch[1] & 0xc0) == 0x80, ("2/%u: %.*Rhxs\n", cb, RT_MIN(cb + 10, strlen((char *)puch)), puch),
Note:
See TracChangeset
for help on using the changeset viewer.