From: <and...@us...> - 2022-10-23 18:25:14
|
Revision: 7370 http://sourceforge.net/p/nsis/code/7370 Author: anders_k Date: 2022-10-23 18:25:12 +0000 (Sun, 23 Oct 2022) Log Message: ----------- Fixed GCC12 binary_function warning (patch #307) Modified Paths: -------------- NSIS/trunk/Docs/src/history.but NSIS/trunk/Source/Plugins.h NSIS/trunk/Source/ResourceEditor.cpp Modified: NSIS/trunk/Docs/src/history.but =================================================================== --- NSIS/trunk/Docs/src/history.but 2022-10-23 18:09:46 UTC (rev 7369) +++ NSIS/trunk/Docs/src/history.but 2022-10-23 18:25:12 UTC (rev 7370) @@ -34,7 +34,7 @@ \b Fixed halibut \#{fprintf format security}compiler warnings (\W{http://sf.net/p/nsis/patches/304}{patch #304}) -\b Fixed issues with very old GCC versions (\W{http://sf.net/p/nsis/bugs/1275}{bug #1275}) +\b Fixed various issues with very old and new GCC versions (\W{http://sf.net/p/nsis/bugs/1275}{bug #1275}, \W{http://sf.net/p/nsis/patches/307}{patch #307}) \b Disable stub relocations in newer GCC (\W{http://sf.net/p/nsis/bugs/1283}{bug #1283}) Modified: NSIS/trunk/Source/Plugins.h =================================================================== --- NSIS/trunk/Source/Plugins.h 2022-10-23 18:09:46 UTC (rev 7369) +++ NSIS/trunk/Source/Plugins.h 2022-10-23 18:25:12 UTC (rev 7370) @@ -24,10 +24,17 @@ namespace STL { + template <class Arg1, class Arg2, class Result> + struct binary_function + { + typedef Arg1 first_argument_type; + typedef Arg2 second_argument_type; + typedef Result result_type; + }; template<class S, class C> - struct string_nocasecmpless : std::binary_function<S, S, bool> + struct string_nocasecmpless : binary_function<S, S, bool> { - struct cmp : public std::binary_function<C, C, bool> + struct cmp : public binary_function<C, C, bool> { bool operator() (const C&a, const C&b) const { Modified: NSIS/trunk/Source/ResourceEditor.cpp =================================================================== --- NSIS/trunk/Source/ResourceEditor.cpp 2022-10-23 18:09:46 UTC (rev 7369) +++ NSIS/trunk/Source/ResourceEditor.cpp 2022-10-23 18:25:12 UTC (rev 7370) @@ -913,7 +913,7 @@ } FILEVIEW &map = *(FILEVIEW*) &X.Map; - size_t datasize; + size_t datasize = 0; char *filedata = create_file_view_readonly(File, map), *data = 0, *dataalloc = 0; if (filedata) { if (resproto) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |