From 66d4f41320f1c40b24b3db7f56029d82b443ee84 Mon Sep 17 00:00:00 2001 From: Ignacio Sanchez Gines <863613+drhelius@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:47:36 +0100 Subject: [PATCH] Fix warnings --- platforms/shared/desktop/nfd/nfd_cocoa.mm | 10 +++++----- platforms/shared/desktop/stb/stb_image_write.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platforms/shared/desktop/nfd/nfd_cocoa.mm b/platforms/shared/desktop/nfd/nfd_cocoa.mm index 5d174df..a277692 100644 --- a/platforms/shared/desktop/nfd/nfd_cocoa.mm +++ b/platforms/shared/desktop/nfd/nfd_cocoa.mm @@ -222,7 +222,7 @@ nfdresult_t NFD_OpenDialogN(nfdnchar_t** outPath, const nfdnfilteritem_t* filterList, nfdfiltersize_t filterCount, const nfdnchar_t* defaultPath) { - nfdopendialognargs_t args = {0}; + nfdopendialognargs_t args = {}; args.filterList = filterList; args.filterCount = filterCount; args.defaultPath = defaultPath; @@ -282,7 +282,7 @@ nfdresult_t NFD_OpenDialogMultipleN(const nfdpathset_t** outPaths, const nfdnfilteritem_t* filterList, nfdfiltersize_t filterCount, const nfdnchar_t* defaultPath) { - nfdopendialognargs_t args = {0}; + nfdopendialognargs_t args = {}; args.filterList = filterList; args.filterCount = filterCount; args.defaultPath = defaultPath; @@ -348,7 +348,7 @@ nfdresult_t NFD_SaveDialogN(nfdnchar_t** outPath, nfdfiltersize_t filterCount, const nfdnchar_t* defaultPath, const nfdnchar_t* defaultName) { - nfdsavedialognargs_t args = {0}; + nfdsavedialognargs_t args = {}; args.filterList = filterList; args.filterCount = filterCount; args.defaultPath = defaultPath; @@ -413,7 +413,7 @@ nfdresult_t NFD_SaveDialogU8_With_Impl(nfdversion_t version, } nfdresult_t NFD_PickFolderN(nfdnchar_t** outPath, const nfdnchar_t* defaultPath) { - nfdpickfoldernargs_t args = {0}; + nfdpickfoldernargs_t args = {}; args.defaultPath = defaultPath; return NFD_PickFolderN_With_Impl(NFD_INTERFACE_VERSION, outPath, &args); } @@ -465,7 +465,7 @@ nfdresult_t NFD_PickFolderU8_With_Impl(nfdversion_t version, } nfdresult_t NFD_PickFolderMultipleN(const nfdpathset_t** outPaths, const nfdnchar_t* defaultPath) { - nfdpickfoldernargs_t args = {0}; + nfdpickfoldernargs_t args = {}; args.defaultPath = defaultPath; return NFD_PickFolderMultipleN_With_Impl(NFD_INTERFACE_VERSION, outPaths, &args); } diff --git a/platforms/shared/desktop/stb/stb_image_write.h b/platforms/shared/desktop/stb/stb_image_write.h index 84e3198..cdcf1e5 100644 --- a/platforms/shared/desktop/stb/stb_image_write.h +++ b/platforms/shared/desktop/stb/stb_image_write.h @@ -773,7 +773,7 @@ static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, f #ifdef __STDC_LIB_EXT1__ len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); #else - len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); + len = snprintf(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); #endif s->func(s->context, buffer, len);