scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit e430542e447c41173e8b94e77b52d2c20177bc2f
parent 56fadec84cdb589309188efc87cddc8d7092abd5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 11 Dec 2024 10:01:54 +0100

as/ld: Fix printf type specifiers

Diffstat:
Msrc/cmd/scc-as/lexh.c | 4++--
Msrc/cmd/scc-ld/section.c | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cmd/scc-as/lexh.c b/src/cmd/scc-as/lexh.c @@ -97,9 +97,9 @@ phash(char *toks[], int ntok) found: printf("unsigned long K=%lu, M=%lu, S=%lu;\n", K, M, S); - printf("short hashmap[%ld] = {\n", 1<<i); + printf("short hashmap[%d] = {\n", 1<<i); for (i = 0; i < ntok; i++) - printf("\t[%d] = %d,\n", (th[i]*K >> S) & M, i+1); + printf("\t[%ld] = %d,\n", (th[i]*K >> S) & M, i+1); puts("};"); } diff --git a/src/cmd/scc-ld/section.c b/src/cmd/scc-ld/section.c @@ -147,7 +147,7 @@ debugsec(void) for (sp = *spp; sp; sp = sp->hash) { sec = &sp->sec; fprintf(stderr, - "sec: %s - %c (%#llx,%#lx)\n", + "sec: %s - %c (%#llx,%#llx)\n", sec->name, sec->type, sec->base,