Changeset 98217 in vbox for trunk/include
- Timestamp:
- Jan 22, 2023 11:01:16 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155406
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VMMDevCoreTypes.h
r98103 r98217 336 336 int GetUInt32(uint32_t RT_FAR *pu32) 337 337 { 338 if (type == VMMDevHGCMParmType_32bit) 339 { 340 *pu32 = u.value32; 341 return VINF_SUCCESS; 342 } 343 return VERR_INVALID_PARAMETER; 338 AssertMsgReturnStmt(type == VMMDevHGCMParmType_32bit, ("type=%d\n", type), 339 *pu32 = UINT32_MAX /* shut up gcc */, VERR_WRONG_PARAMETER_TYPE); 340 *pu32 = u.value32; 341 return VINF_SUCCESS; 344 342 } 345 343 … … 352 350 int GetUInt64(uint64_t RT_FAR *pu64) 353 351 { 354 if (type == VMMDevHGCMParmType_64bit) 355 { 356 *pu64 = u.value64; 357 return VINF_SUCCESS; 358 } 359 return VERR_INVALID_PARAMETER; 352 AssertMsgReturnStmt(type == VMMDevHGCMParmType_64bit, ("type=%d\n", type), 353 *pu64 = UINT64_MAX /* shut up gcc */, VERR_WRONG_PARAMETER_TYPE); 354 *pu64 = u.value64; 355 return VINF_SUCCESS; 360 356 } 361 357 … … 420 416 int GetUInt32(uint32_t RT_FAR *pu32) 421 417 { 422 if (type == VMMDevHGCMParmType_32bit) 423 { 424 *pu32 = u.value32; 425 return VINF_SUCCESS; 426 } 427 return VERR_INVALID_PARAMETER; 418 AssertMsgReturnStmt(type == VMMDevHGCMParmType_32bit, ("type=%d\n", type), 419 *pu32 = UINT32_MAX /* shut up gcc */, VERR_WRONG_PARAMETER_TYPE); 420 *pu32 = u.value32; 421 return VINF_SUCCESS; 428 422 } 429 423 … … 436 430 int GetUInt64(uint64_t RT_FAR *pu64) 437 431 { 438 if (type == VMMDevHGCMParmType_64bit) 439 { 440 *pu64 = u.value64; 441 return VINF_SUCCESS; 442 } 443 return VERR_INVALID_PARAMETER; 432 AssertMsgReturnStmt(type == VMMDevHGCMParmType_64bit, ("type=%d\n", type), 433 *pu64 = UINT64_MAX /* shut up gcc */, VERR_WRONG_PARAMETER_TYPE); 434 *pu64 = u.value64; 435 return VINF_SUCCESS; 444 436 } 445 437 … … 519 511 int GetUInt32(uint32_t *pu32) 520 512 { 521 AssertMsgReturnStmt(type == VMMDevHGCMParmType_32bit, ("type= -%d\n", type),513 AssertMsgReturnStmt(type == VMMDevHGCMParmType_32bit, ("type=%d\n", type), 522 514 *pu32 = UINT32_MAX /* shut up gcc */, VERR_WRONG_PARAMETER_TYPE) 523 515 *pu32 = u.value32; … … 534 526 { 535 527 AssertMsgReturnStmt(type == VMMDevHGCMParmType_64bit, ("type=%d\n", type), 536 *pu64 = UINT 32_MAX /* shut up gcc */, VERR_WRONG_PARAMETER_TYPE);528 *pu64 = UINT64_MAX /* shut up gcc */, VERR_WRONG_PARAMETER_TYPE); 537 529 *pu64 = u.value64; 538 530 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.