summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorkipcode66 <kipcode66@gmail.com>2025-12-22 05:20:08 -0500
committerGitHub <noreply@github.com>2025-12-22 02:20:08 -0800
commit47ac1d4a4cbc5a6835c80d80e7756d6b4a6cd0a6 (patch)
tree555fb336b8cc397e259582340c3a95d843a4add6 /tools
parent4045f16667fe6903243801e1155d086ae8df27b1 (diff)
4th round of standard compiler fixes (#2984)
* 4th round of standard compiler fixes * use of fpcM_ERROR_PROCESS_ID_e in gWolfBustersID
Diffstat (limited to 'tools')
-rwxr-xr-xtools/converters/matDL_dis.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/converters/matDL_dis.py b/tools/converters/matDL_dis.py
index e712018e12..d104e8e637 100755
--- a/tools/converters/matDL_dis.py
+++ b/tools/converters/matDL_dis.py
@@ -317,9 +317,9 @@ def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name, scope):
macro_name = os.path.splitext(os.path.basename(src_path))[0]
with open(src_path, "rb") as binary_file, open(dest_path, "w") as c_file:
c_file.write("#ifndef LOAD_BP_REG\n")
- c_file.write("#define U32_AS_U8(v) (((v) >> 24) & 0xFF), (((v) >> 16) & 0xFF), (((v) >> 8) & 0xFF), (((v) >> 0) & 0xFF)\n")
- c_file.write("#define U24_AS_U8(v) (((v) >> 16) & 0xFF), (((v) >> 8) & 0xFF), (((v) >> 0) & 0xFF)\n")
- c_file.write("#define U16_AS_U8(v) (((v) >> 8) & 0xFF), (((v) >> 0) & 0xFF)\n")
+ c_file.write("#define U32_AS_U8(v) (u8)(((v) >> 24) & 0xFF), (u8)(((v) >> 16) & 0xFF), (u8)(((v) >> 8) & 0xFF), (u8)(((v) >> 0) & 0xFF)\n")
+ c_file.write("#define U24_AS_U8(v) (u8)(((v) >> 16) & 0xFF), (u8)(((v) >> 8) & 0xFF), (u8)(((v) >> 0) & 0xFF)\n")
+ c_file.write("#define U16_AS_U8(v) (u8)(((v) >> 8) & 0xFF), (u8)(((v) >> 0) & 0xFF)\n")
c_file.write("#define IMAGE_ADDR(addr) (u32)(addr) >> 5\n")
c_file.write("#define LOAD_BP_REG(reg, value) GX_CMD_LOAD_BP_REG, reg, U24_AS_U8(value)\n")
c_file.write("#define LOAD_XF_REG(reg, num_args, ...) GX_CMD_LOAD_XF_REG, U16_AS_U8(num_args-1), U16_AS_U8(reg), __VA_ARGS__\n")