Commit 00d05df
committed
tools/mksyscall: fix union illegal type for cast
Some compilers (e.g., Tasking) do not allow forced type casting of
unions. When CONFIG_ARCH_TOOLCHAIN_TASKING is enabled, replace the
direct cast with memcpy to copy the union parameter into a local
variable, avoiding the illegal cast while preserving the correct
behavior. Other compilers still use the original cast approach.
Signed-off-by: zhangyuan29 <[email protected]>1 parent 9ecfff0 commit 00d05df
1 file changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
431 | 434 | | |
432 | 435 | | |
433 | 436 | | |
| |||
461 | 464 | | |
462 | 465 | | |
463 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
464 | 489 | | |
465 | 490 | | |
466 | 491 | | |
| |||
503 | 528 | | |
504 | 529 | | |
505 | 530 | | |
506 | | - | |
| 531 | + | |
507 | 532 | | |
508 | 533 | | |
509 | 534 | | |
| |||
0 commit comments