diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2020-02-17 16:36:21 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2020-02-23 09:49:33 +0100 |
commit | 986db1adb491b5cb5936d2369816236847af26da (patch) | |
tree | 0ef08fe1b908b86bc01cb260872ea34d42a7353a | |
parent | b87b4a61476bb65e9200bd2ee93b8a98ca4db84e (diff) | |
download | rneovim-986db1adb491b5cb5936d2369816236847af26da.tar.gz rneovim-986db1adb491b5cb5936d2369816236847af26da.tar.bz2 rneovim-986db1adb491b5cb5936d2369816236847af26da.zip |
nvim: Fix enum declaration of RemapValues
Instead of declaring an enum, this creates a global variable. As gcc10
uses -fno-common by default, global variables declared with the same
name more than once is not allowed anymore revealing this issue.
Each time this header is included, we define the enum name as a global
variable.
See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
-rw-r--r-- | src/nvim/getchar.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/getchar.h b/src/nvim/getchar.h index 01f60ccf49..f0b52079aa 100644 --- a/src/nvim/getchar.h +++ b/src/nvim/getchar.h @@ -10,12 +10,12 @@ /// Values for "noremap" argument of ins_typebuf() /// /// Also used for map->m_noremap and menu->noremap[]. -enum { +enum RemapValues { REMAP_YES = 0, ///< Allow remapping. REMAP_NONE = -1, ///< No remapping. REMAP_SCRIPT = -2, ///< Remap script-local mappings only. REMAP_SKIP = -3, ///< No remapping for first char. -} RemapValues; +}; // Argument for flush_buffers(). typedef enum { |