To: vim_dev@googlegroups.com Subject: Patch 8.2.4347 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4347 Problem: In some build setups UNUSED is not defined. Solution: Change the logic of how UNUSED is defined. (Ola Söder, closes #9734) Files: src/vim.h *** ../vim-8.2.4346/src/vim.h 2022-02-09 12:58:16.502258779 +0000 --- src/vim.h 2022-02-11 19:25:29.826917866 +0000 *************** *** 245,256 **** // Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter // can be used to check for mistakes. ! #if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__) ! # if !defined(UNUSED) # define UNUSED __attribute__((unused)) # endif - #else - # define UNUSED #endif // Used to check for "sun", "__sun" is used by newer compilers. --- 245,263 ---- // Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter // can be used to check for mistakes. ! #ifndef UNUSED ! # if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__) # define UNUSED __attribute__((unused)) + # else + # if defined __has_attribute + # if __has_attribute(unused) + # define UNUSED __attribute__((unused)) + # endif + # endif + # endif + # ifndef UNUSED + # define UNUSED # endif #endif // Used to check for "sun", "__sun" is used by newer compilers. *** ../vim-8.2.4346/src/version.c 2022-02-11 18:51:27.813814058 +0000 --- src/version.c 2022-02-11 19:24:40.366989784 +0000 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4347, /**/ -- `The Guide says there is an art to flying,' said Ford, `or at least a knack. The knack lies in learning how to throw yourself at the ground and miss.' He smiled weakly. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///