1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-08 17:21:20 +00:00

Correct -Wformat-pedantic warnings

Many of the warnings were newly visible after the DBPRINT macro
was modified, but the pedantic warnings also caught existing printf
family usage which was not strictly correct.

Mostly replacing 0x%x with %p for pointers, adding (void *) for
those and other pointers, %td for ptrdiff_t, but also changing
some function parameters from UNSIGNED (uintptr_t) to int
where that was the more appropriate type.
This commit is contained in:
Nick Briggs
2022-08-11 14:12:51 -07:00
parent e72dd332a3
commit d91de66322
21 changed files with 56 additions and 58 deletions

View File

@@ -196,7 +196,7 @@ LispPTR gcscanstack(void) {
char debugStr[100];
sprintf(debugStr,
"Frame ptr (%p) not to word bound at start of gcscanstack.",
basicframe);
(void *)basicframe);
error(debugStr);
}
@@ -275,7 +275,7 @@ LispPTR gcscanstack(void) {
sprintf(debugStr,
"Frame ptr (%p) not to word bound "
"in gcscanstack() STK_FX case; old frame = %p.",
basicframe, obasicframe);
(void *)basicframe, (void *)obasicframe);
error(debugStr);
}
@@ -296,7 +296,7 @@ LispPTR gcscanstack(void) {
sprintf(debugStr,
"Frame ptr (%p) not to word bound "
"in gcscanstack() scantemps; old frame = %p.",
basicframe, obasicframe);
(void *)basicframe, (void *)obasicframe);
error(debugStr);
}
@@ -313,7 +313,7 @@ LispPTR gcscanstack(void) {
sprintf(debugStr,
"Frame ptr (%p) not to word bound "
"in gcscanstack(), end scantemps; old frame = %p.",
basicframe, obasicframe);
(void *)basicframe, (void *)obasicframe);
error(debugStr);
}
@@ -333,7 +333,7 @@ LispPTR gcscanstack(void) {
sprintf(debugStr,
"Frame ptr (%p) not to word bound "
"in gcscanstack() STK_GUARD; old frame = %p.",
basicframe, obasicframe);
(void *)basicframe, (void *)obasicframe);
error(debugStr);
}
};
@@ -348,7 +348,7 @@ LispPTR gcscanstack(void) {
sprintf(debugStr,
"Frame ptr (%p) not to word bound "
"in gcscanstack() STK_FSB; old frame = %p.",
basicframe, obasicframe);
(void *)basicframe, (void *)obasicframe);
error(debugStr);
}