Skip to content

Commit 3afb24f

Browse files
committed
fix aarch64 compiler warning
1 parent bcae196 commit 3afb24f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/finsh/finsh.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#define HEAP_ALIGNMENT 4 /* heap alignment */
2828

2929
#define FINSH_GET16(x) (*(x)) | (*((x)+1) << 8)
30-
#define FINSH_GET32(x) (rt_uint32_t)(*(x)) | ((rt_uint32_t)*((x)+1) << 8) | \
31-
((rt_uint32_t)*((x)+2) << 16) | ((rt_uint32_t)*((x)+3) << 24)
30+
#define FINSH_GET32(x) (rt_ubase_t)(*(x)) | ((rt_ubase_t)*((x)+1) << 8) | \
31+
((rt_ubase_t)*((x)+2) << 16) | ((rt_ubase_t)*((x)+3) << 24)
3232

3333
#define FINSH_SET16(x, v) \
3434
do \

components/finsh/finsh_compiler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static int finsh_compile(struct finsh_node* node)
191191
case FINSH_NODE_VALUE_NULL:
192192
case FINSH_NODE_VALUE_STRING:
193193
finsh_code_byte(FINSH_OP_LD_DWORD);
194-
finsh_code_dword((uint32_t)node->value.ptr);
194+
finsh_code_dword((rt_ubase_t)node->value.ptr);
195195
break;
196196

197197
/* arithmetic operation */

0 commit comments

Comments
 (0)