Skip to content

Commit

Permalink
patch 8.2.4347: in some build setups UNUSED is not defined
Browse files Browse the repository at this point in the history
Problem:    In some build setups UNUSED is not defined.
Solution:   Change the logic of how UNUSED is defined. (Ola Söder,
            closes #9734)
  • Loading branch information
olasoder-work authored and brammool committed Feb 11, 2022
1 parent 481acb1 commit bd89d44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -746,6 +746,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4347,
/**/
4346,
/**/
Expand Down
15 changes: 11 additions & 4 deletions src/vim.h
Expand Up @@ -245,12 +245,19 @@

// 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)
#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
#else
# define UNUSED
#endif

// Used to check for "sun", "__sun" is used by newer compilers.
Expand Down

0 comments on commit bd89d44

Please sign in to comment.