add support of clang 14.0.3

This commit is contained in:
InoriRus
2022-05-25 20:07:51 +10:00
parent 6129b6ecac
commit adda20a6fe
53 changed files with 681 additions and 210 deletions
+3 -1
View File
@@ -55,7 +55,9 @@ static KYTY_SYSV_ABI int atexit(void (*func)())
::printf("func = %" PRIx64 "\n", reinterpret_cast<uint64_t>(func));
::atexit(func);
int ok = ::atexit(func);
EXIT_NOT_IMPLEMENTED(ok != 0);
return 0;
}
+6 -2
View File
@@ -173,7 +173,9 @@ int KYTY_SYSV_ABI SaveDataMount(const SaveDataMount* mount, SaveDataMountResult*
mount_result->mount_status = 1;
}
snprintf(mount_result->mount_point.data, 16, "%s", mount_point.C_Str());
int s = snprintf(mount_result->mount_point.data, 16, "%s", mount_point.C_Str());
EXIT_NOT_IMPLEMENTED(s >= 16);
mount_result->required_blocks = 0;
@@ -234,7 +236,9 @@ int KYTY_SYSV_ABI SaveDataMount2(const SaveDataMount2* mount, SaveDataMountResul
mount_result->mount_status = 1;
}
snprintf(mount_result->mount_point.data, 16, "%s", mount_point.C_Str());
int s = snprintf(mount_result->mount_point.data, 16, "%s", mount_point.C_Str());
EXIT_NOT_IMPLEMENTED(s >= 16);
mount_result->required_blocks = 0;
+3 -1
View File
@@ -89,7 +89,9 @@ static KYTY_SYSV_ABI int UserServiceGetUserName(int user_id, char* name, size_t
EXIT_NOT_IMPLEMENTED(user_id != 1);
EXIT_NOT_IMPLEMENTED(size < 5);
snprintf(name, size, "%s", "Kyty");
int s = snprintf(name, size, "%s", "Kyty");
EXIT_NOT_IMPLEMENTED(static_cast<size_t>(s) >= size);
return OK;
}
+3 -2
View File
@@ -8,6 +8,7 @@
#include "Emulator/Libs/Printf.h"
#include "Kyty/Core/Common.h"
#include "Kyty/Core/DbgAssert.h"
#include "Kyty/Core/Vector.h"
#include "Emulator/Common.h"
@@ -15,7 +16,6 @@
#include <cfloat>
#include <cmath>
#include <cstddef>
#ifdef KYTY_EMU_ENABLED
@@ -856,7 +856,8 @@ static int kyty_printf_internal(bool sn, char* sn_s, size_t sn_n, const char* fo
if (sn)
{
snprintf(sn_s, sn_n, "%s", buffer.GetDataConst());
int s = snprintf(sn_s, sn_n, "%s", buffer.GetDataConst());
EXIT_NOT_IMPLEMENTED(static_cast<size_t>(s) >= sn_n);
} else
{
printf(FG_BRIGHT_MAGENTA "%s" DEFAULT, buffer.GetDataConst());