comparison src/vim.h @ 27643:517daf1a6e5b v8.2.4347

patch 8.2.4347: in some build setups UNUSED is not defined Commit: https://github.com/vim/vim/commit/bd89d4406327d3a30517443a4a518f49ebc99368 Author: ola.soder@axis.com <ola.soder@axis.com> Date: Fri Feb 11 19:27:55 2022 +0000 patch 8.2.4347: in some build setups UNUSED is not defined Problem: In some build setups UNUSED is not defined. Solution: Change the logic of how UNUSED is defined. (Ola S?der, closes #9734)
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Feb 2022 20:30:03 +0100
parents 269f89efb06a
children b157387cb232
comparison
equal deleted inserted replaced
27642:46d8185de1e9 27643:517daf1a6e5b
243 # include "os_unix.h" // bring lots of system header files 243 # include "os_unix.h" // bring lots of system header files
244 #endif 244 #endif
245 245
246 // Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter 246 // Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
247 // can be used to check for mistakes. 247 // can be used to check for mistakes.
248 #if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__) 248 #ifndef UNUSED
249 # if !defined(UNUSED) 249 # if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__)
250 # define UNUSED __attribute__((unused)) 250 # define UNUSED __attribute__((unused))
251 # endif 251 # else
252 #else 252 # if defined __has_attribute
253 # define UNUSED 253 # if __has_attribute(unused)
254 # define UNUSED __attribute__((unused))
255 # endif
256 # endif
257 # endif
258 # ifndef UNUSED
259 # define UNUSED
260 # endif
254 #endif 261 #endif
255 262
256 // Used to check for "sun", "__sun" is used by newer compilers. 263 // Used to check for "sun", "__sun" is used by newer compilers.
257 #if defined(__sun) 264 #if defined(__sun)
258 # define SUN_SYSTEM 265 # define SUN_SYSTEM