Signed-off-by: Glenn Washburn <development(a)efficientek.com>
---
This compile-time errors from GCC 10.1.0 when the config options
CONFIG_DEBUG_BOOT, CONFIG_DEBUG_DICTIONARY, and CONFIG_DEBUG_INTERPRETER
are set to true in the ppc64_config.xml. I suspect these are issues for 32-bit
PPC as well, but haven't checked.
Glenn
---
kernel/bootstrap.c | 8 ++++----
kernel/dict.c | 4 ++--
kernel/forth.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c
index b7658ab..6834597 100644
--- a/kernel/bootstrap.c
+++ b/kernel/bootstrap.c
@@ -133,9 +133,9 @@ static void relocation_table(unsigned char * dict_one, unsigned char *dict_two,
}
#ifdef CONFIG_DEBUG_DICTIONARY
- printk("dict1 %lx dict2 %lx dict %lx\n",dict_one, dict_two, dict);
+ printk("dict1 %p dict2 %p dict %p\n",dict_one, dict_two, dict);
for (i=0; i< relocation_length ; i++)
- printk("reloc %d %lx\n",i+1, reloc_table[i]);
+ printk("reloc %d "FMT_ucellx"\n",i+1, reloc_table[i]);
#endif
relocation_address=reloc_table;
}
@@ -819,7 +819,7 @@ static int build_dictionary(void)
dicthead = 0;
#ifdef CONFIG_DEBUG_DICTIONARY
- printk("building dictionary, %d primitives.\nbuilt words:",
+ printk("building dictionary, %lu primitives.\nbuilt words:",
sizeof(wordnames) / sizeof(void *));
#endif
@@ -1248,7 +1248,7 @@ int main(int argc, char *argv[])
printf("dict1: %p\n",bootstrapdict[0]);
printf("dict2: %p\n",bootstrapdict[1]);
printf("trampoline: %p\n",trampoline);
- printf("size=%d, trampoline_size=%d\n",MEMORY_SIZE + (2 *
+ printf("size=%ld, trampoline_size=%ld\n",MEMORY_SIZE + (2 *
DICTIONARY_SIZE) + TRAMPOLINE_SIZE,
TRAMPOLINE_SIZE);
#endif
diff --git a/kernel/dict.c b/kernel/dict.c
index 0986cb1..e449c5b 100644
--- a/kernel/dict.c
+++ b/kernel/dict.c
@@ -293,8 +293,8 @@ ucell load_dictionary(const char *data, ucell len)
reloc_table=(ucell *)(data+dicthead);
#ifdef CONFIG_DEBUG_DICTIONARY
- printk("\nmoving dictionary (%x bytes) to %x\n",
- (ucell)dicthead, (ucell)dict);
+ printk("\nmoving dictionary (%x bytes) to "FMT_ucellx"\n",
+ (ucell)dicthead, pointer2cell(dict));
printk("\ndynamic relocation...");
#endif
diff --git a/kernel/forth.c b/kernel/forth.c
index 61dd70d..ca3fda3 100644
--- a/kernel/forth.c
+++ b/kernel/forth.c
@@ -111,7 +111,7 @@ static void docol(void)
PUSHR(PC);
PC = read_ucell(cell2pointer(PC));
- dbg_interp_printk("docol: %s\n", cell2pointer( lfa2nfa(PC - sizeof(cell)) ));
+ dbg_interp_printk("docol: %s\n", (char *)cell2pointer( lfa2nfa(PC - sizeof(cell)) ));
}
static void semis(void)
@@ -719,7 +719,7 @@ static void docol_dbg(void)
debug_xt_item = debug_xt_item->next;
}
- dbg_interp_printk("docol_dbg: %s\n", cell2pointer(lfa2nfa(PC - sizeof(cell))));
+ dbg_interp_printk("docol_dbg: %s\n", (char *)cell2pointer(lfa2nfa(PC - sizeof(cell))));
}
static void semis_dbg(void)
--
2.30.2