aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-05-19 21:55:11 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2016-05-19 21:55:11 +0200
commit1fabc639078e1ddbc4ef6ddd7cb310a67fb1c0fb (patch)
treea34549d4d51001b091e5f90c3738a618123b770f
parent509089d0533c250d1a1268eb637d3413209b1da6 (diff)
parent1a194fad22953401c13732d3a2b6d44bc4e87420 (diff)
downloadrneovim-1fabc639078e1ddbc4ef6ddd7cb310a67fb1c0fb.tar.gz
rneovim-1fabc639078e1ddbc4ef6ddd7cb310a67fb1c0fb.tar.bz2
rneovim-1fabc639078e1ddbc4ef6ddd7cb310a67fb1c0fb.zip
Merge pull request #4761 from bfredl/gcc61warnings
Fix warnings with gcc 6.1
-rw-r--r--src/nvim/assert.h9
-rw-r--r--src/nvim/ex_cmds.c15
2 files changed, 16 insertions, 8 deletions
diff --git a/src/nvim/assert.h b/src/nvim/assert.h
index 2c43777858..761636305e 100644
--- a/src/nvim/assert.h
+++ b/src/nvim/assert.h
@@ -65,9 +65,16 @@
# define STATIC_ASSERT_STATEMENT(cond, msg) _Static_assert(cond, msg)
# undef STATIC_ASSERT_PRAGMA_START
+
+#if __GNUC__ >= 6
# define STATIC_ASSERT_PRAGMA_START \
_Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-pedantic\"") \
+ _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
+#else
+# define STATIC_ASSERT_PRAGMA_START \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-pedantic\"")
+#endif
# undef STATIC_ASSERT_PRAGMA_END
# define STATIC_ASSERT_PRAGMA_END \
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 415d6ee460..86f1a16216 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3816,16 +3816,17 @@ skip:
EMSG2(_(e_patnotf2), get_search_pat());
}
- if (do_ask && hasAnyFolding(curwin))
- /* Cursor position may require updating */
+ if (do_ask && hasAnyFolding(curwin)) {
+ // Cursor position may require updating
changed_window_setting();
+ }
- vim_regfree(regmatch.regprog);
+ vim_regfree(regmatch.regprog);
- // Restore the flag values, they can be used for ":&&".
- do_all = save_do_all;
- do_ask = save_do_ask;
- }
+ // Restore the flag values, they can be used for ":&&".
+ do_all = save_do_all;
+ do_ask = save_do_ask;
+}
/*
* Give message for number of substitutions.