From ad66e4eec310da9ef94f3b26a01d705e12c36ce7 Mon Sep 17 00:00:00 2001 From: TorusHyperV <100166926+TorusHyperV@users.noreply.github.com> Date: Wed, 4 Sep 2024 23:19:50 +0200 Subject: [PATCH] fix - multiple build errors --- src/exfat_dir.c | 2 +- src/file_xb1_bootcap.c | 2 ++ src/ntfs_dir.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/exfat_dir.c b/src/exfat_dir.c index 7cdfc147..6cfb5dd4 100644 --- a/src/exfat_dir.c +++ b/src/exfat_dir.c @@ -90,7 +90,7 @@ static int exfat_ucstoutf8(iconv_t cd, const unsigned char *ins, const unsigned inb_left = ins_len; outb_left = outs_len - 1; // reserve 1 byte for NUL - if (iconv(cd, (char **)&inp, &inb_left, &outp, &outb_left) == (size_t)(-1)) + if (iconv(cd, (const char **)&inp, &inb_left, &outp, &outb_left) == (size_t)(-1)) { // Regardless of the value of errno log_error("exfat_ucstoutf8: iconv failed %s\n", strerror(errno)); diff --git a/src/file_xb1_bootcap.c b/src/file_xb1_bootcap.c index b37bfb29..63e9b1ab 100644 --- a/src/file_xb1_bootcap.c +++ b/src/file_xb1_bootcap.c @@ -33,6 +33,8 @@ #include "filegen.h" #include "common.h" +#define max(x,y) (((int)((x)<(y)) * (y)) + ((int)((y)<=(x)) * (x))) + #define XB1_BOOTCAP_MAXSIZE 0x400 /*@ requires valid_register_header_check(file_stat); */ diff --git a/src/ntfs_dir.c b/src/ntfs_dir.c index d6fc559f..e30fca81 100644 --- a/src/ntfs_dir.c +++ b/src/ntfs_dir.c @@ -153,7 +153,7 @@ static int ntfs_ucstoutf8(iconv_t cd, const ntfschar *ins, const int ins_len, ch outb_left = outs_len - 1; // reserve 1 byte for NUL *outp = '\0'; - if (iconv(cd, (char**)&inp, &inb_left, &outp, &outb_left) == (size_t)(-1)) + if (iconv(cd, (const char**)&inp, &inb_left, &outp, &outb_left) == (size_t)(-1)) { // Regardless of the value of errno log_error("ntfs_ucstoutf8: iconv failed\n");