mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
481acb1141
commit
bd89d44063
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4347,
|
||||||
/**/
|
/**/
|
||||||
4346,
|
4346,
|
||||||
/**/
|
/**/
|
||||||
|
11
src/vim.h
11
src/vim.h
@@ -245,13 +245,20 @@
|
|||||||
|
|
||||||
// Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
|
// Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
|
||||||
// can be used to check for mistakes.
|
// can be used to check for mistakes.
|
||||||
|
#ifndef UNUSED
|
||||||
# if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__)
|
# if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__)
|
||||||
# if !defined(UNUSED)
|
# define UNUSED __attribute__((unused))
|
||||||
|
# else
|
||||||
|
# if defined __has_attribute
|
||||||
|
# if __has_attribute(unused)
|
||||||
# define UNUSED __attribute__((unused))
|
# define UNUSED __attribute__((unused))
|
||||||
# endif
|
# endif
|
||||||
#else
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifndef UNUSED
|
||||||
# define UNUSED
|
# define UNUSED
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Used to check for "sun", "__sun" is used by newer compilers.
|
// Used to check for "sun", "__sun" is used by newer compilers.
|
||||||
#if defined(__sun)
|
#if defined(__sun)
|
||||||
|
Reference in New Issue
Block a user