Sfoglia il codice sorgente

fix aarch64 compiler warning

bigmagic 5 anni fa
parent
commit
3afb24f4c1
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      components/finsh/finsh.h
  2. 1 1
      components/finsh/finsh_compiler.c

+ 2 - 2
components/finsh/finsh.h

@@ -27,8 +27,8 @@
 #define HEAP_ALIGNMENT          4       /* heap alignment */
 
 #define FINSH_GET16(x)    (*(x)) | (*((x)+1) << 8)
-#define FINSH_GET32(x)    (rt_uint32_t)(*(x)) | ((rt_uint32_t)*((x)+1) << 8) | \
-    ((rt_uint32_t)*((x)+2) << 16) | ((rt_uint32_t)*((x)+3) << 24)
+#define FINSH_GET32(x)    (rt_ubase_t)(*(x)) | ((rt_ubase_t)*((x)+1) << 8) | \
+    ((rt_ubase_t)*((x)+2) << 16) | ((rt_ubase_t)*((x)+3) << 24)
 
 #define FINSH_SET16(x, v)           \
     do                              \

+ 1 - 1
components/finsh/finsh_compiler.c

@@ -191,7 +191,7 @@ static int finsh_compile(struct finsh_node* node)
         case FINSH_NODE_VALUE_NULL:
         case FINSH_NODE_VALUE_STRING:
             finsh_code_byte(FINSH_OP_LD_DWORD);
-            finsh_code_dword((uint32_t)node->value.ptr);
+            finsh_code_dword((rt_ubase_t)node->value.ptr);
             break;
 
         /* arithmetic operation */