diff --git a/deps/nfde/CMakeLists.txt b/deps/nfde/CMakeLists.txt index 785bdada..bdaa8de1 100644 --- a/deps/nfde/CMakeLists.txt +++ b/deps/nfde/CMakeLists.txt @@ -12,10 +12,6 @@ endif() option(NFD_BUILD_TESTS "Build tests for nfd" ${nfd_ROOT_PROJECT}) option(NFD_INSTALL "Generate install target for nfd" ${nfd_ROOT_PROJECT}) -if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") -endif() - set(nfd_PLATFORM Undefined) if(WIN32) set(nfd_PLATFORM PLATFORM_WIN32) diff --git a/deps/nfde/src/nfd_gtk.cpp b/deps/nfde/src/nfd_gtk.cpp index dda56a88..05f39be0 100644 --- a/deps/nfde/src/nfd_gtk.cpp +++ b/deps/nfde/src/nfd_gtk.cpp @@ -124,14 +124,14 @@ void AddFiltersToDialog(GtkFileChooser* chooser, // +1 for the trailing '\0' nfdnchar_t* extnBuf = NFDi_Malloc(sizeof(nfdnchar_t) * - (p_spec - p_extensionStart + 3)); + static_cast(p_spec - p_extensionStart + 3)); nfdnchar_t* p_extnBufEnd = extnBuf; *p_extnBufEnd++ = '*'; *p_extnBufEnd++ = '.'; p_extnBufEnd = copy(p_extensionStart, p_spec, p_extnBufEnd); *p_extnBufEnd++ = '\0'; - assert((size_t)(p_extnBufEnd - extnBuf) == - sizeof(nfdnchar_t) * (p_spec - p_extensionStart + 3)); + assert(static_cast(p_extnBufEnd - extnBuf) == + sizeof(nfdnchar_t) * static_cast(p_spec - p_extensionStart + 3)); gtk_file_filter_add_pattern(filter, extnBuf); NFDi_Free(extnBuf); @@ -148,7 +148,7 @@ void AddFiltersToDialog(GtkFileChooser* chooser, } *p_nameBuf++ = ')'; *p_nameBuf++ = '\0'; - assert((size_t)(p_nameBuf - nameBuf) == sizeof(nfdnchar_t) * nameSize); + assert(static_cast(p_nameBuf - nameBuf) == sizeof(nfdnchar_t) * nameSize); // add to the filter gtk_file_filter_set_name(filter, nameBuf); @@ -224,14 +224,14 @@ Pair_GtkFileFilter_FileExtension* AddFiltersToDialogWithMap(GtkFileChooser* choo // +1 for the trailing '\0' nfdnchar_t* extnBuf = NFDi_Malloc(sizeof(nfdnchar_t) * - (p_spec - p_extensionStart + 3)); + static_cast(p_spec - p_extensionStart + 3)); nfdnchar_t* p_extnBufEnd = extnBuf; *p_extnBufEnd++ = '*'; *p_extnBufEnd++ = '.'; p_extnBufEnd = copy(p_extensionStart, p_spec, p_extnBufEnd); *p_extnBufEnd++ = '\0'; - assert((size_t)(p_extnBufEnd - extnBuf) == - sizeof(nfdnchar_t) * (p_spec - p_extensionStart + 3)); + assert(static_cast(p_extnBufEnd - extnBuf) == + sizeof(nfdnchar_t) * static_cast(p_spec - p_extensionStart + 3)); gtk_file_filter_add_pattern(filter, extnBuf); NFDi_Free(extnBuf); @@ -254,7 +254,7 @@ Pair_GtkFileFilter_FileExtension* AddFiltersToDialogWithMap(GtkFileChooser* choo } *p_nameBuf++ = ')'; *p_nameBuf++ = '\0'; - assert((size_t)(p_nameBuf - nameBuf) == sizeof(nfdnchar_t) * nameSize); + assert(static_cast(p_nameBuf - nameBuf) == sizeof(nfdnchar_t) * nameSize); // add to the filter gtk_file_filter_set_name(filter, nameBuf); @@ -338,7 +338,7 @@ void FileActivatedSignalHandler(GtkButton* saveButton, void* userdata) { // memory for appended string (including '.' and // trailing '\0') char* appendedFileName = NFDi_Malloc( - sizeof(char) * ((p_period - currentFileName) + + sizeof(char) * static_cast((p_period - currentFileName) + (filterMap->extensionEnd - filterMap->extensionBegin) + 2)); char* p_fileName = copy(currentFileName, p_period, appendedFileName); *p_fileName++ = '.';