From 451b859916459c79c9fa30d16b3eef5c924d81d3 Mon Sep 17 00:00:00 2001 From: "Magomed Kostoev (mkostoevr)" Date: Sun, 25 Jul 2021 19:14:27 +0000 Subject: [PATCH] [clink] Small fixes for GCC (rev. cbd306345347fae28f12fa7f79960403d19e216e) git-svn-id: svn://kolibrios.org@9085 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/clink/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/programs/develop/clink/main.c b/programs/develop/clink/main.c index 037b516c65..24b85f34b8 100644 --- a/programs/develop/clink/main.c +++ b/programs/develop/clink/main.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -120,7 +121,7 @@ typedef struct { static int emit_logs; -static int log_info(const char *fmt, ...) { +static void log_info(const char *fmt, ...) { if (emit_logs) { va_list ap; va_start(ap, fmt); @@ -421,7 +422,7 @@ static void build(ObjectIr *ir, const char *outname) { sym.sym.symbol.SectionNumber = get_section_number(&ir->section_names_set, sec_name); if (sym.sym.symbol.SectionNumber == 0) { - printf("Internal error: %s section is not found in output file"); + printf("Internal error: %s section is not found in output file", sec_name); exit(-1); } @@ -444,8 +445,8 @@ static void build(ObjectIr *ir, const char *outname) { // COFF String Table log_info("Writing COFF String Table... "); - fwrite32(out, cvec_pchar_size(&strtab) + 4); - fwrite(strtab, 1, cvec_pchar_size(&strtab), out); + fwrite32(out, cvec_char_size(&strtab) + 4); + fwrite(strtab, 1, cvec_char_size(&strtab), out); log_info("Done.\n"); }