Commit 973805a
committed
tools/mksyscall: fix union illegal type for cast
Some compilers (e.g., Tasking) do not allow forced type casting of
unions. Replace the direct cast with memcpy to copy the union parameter
into a local variable, avoiding the illegal cast while preserving the
correct behavior.
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>1 parent 9ecfff0 commit 973805a
1 file changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
431 | 432 | | |
432 | 433 | | |
433 | 434 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
464 | 485 | | |
465 | 486 | | |
466 | 487 | | |
| |||
503 | 524 | | |
504 | 525 | | |
505 | 526 | | |
506 | | - | |
| 527 | + | |
507 | 528 | | |
508 | 529 | | |
509 | 530 | | |
| |||
0 commit comments