Fix warnings with gcc 6.1

The intentional behavior of do_sub was checked in vim
This commit is contained in:
Björn Linse
2016-05-15 11:51:38 +02:00
parent 509089d053
commit 1a194fad22
2 changed files with 17 additions and 9 deletions

View File

@@ -65,9 +65,16 @@
# define STATIC_ASSERT_STATEMENT(cond, msg) _Static_assert(cond, msg) # define STATIC_ASSERT_STATEMENT(cond, msg) _Static_assert(cond, msg)
# undef STATIC_ASSERT_PRAGMA_START # undef STATIC_ASSERT_PRAGMA_START
#if __GNUC__ >= 6
# define STATIC_ASSERT_PRAGMA_START \ # define STATIC_ASSERT_PRAGMA_START \
_Pragma("GCC diagnostic push") \ _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 # undef STATIC_ASSERT_PRAGMA_END
# define STATIC_ASSERT_PRAGMA_END \ # define STATIC_ASSERT_PRAGMA_END \

View File

@@ -3816,16 +3816,17 @@ skip:
EMSG2(_(e_patnotf2), get_search_pat()); EMSG2(_(e_patnotf2), get_search_pat());
} }
if (do_ask && hasAnyFolding(curwin)) if (do_ask && hasAnyFolding(curwin)) {
/* Cursor position may require updating */ // Cursor position may require updating
changed_window_setting(); changed_window_setting();
}
vim_regfree(regmatch.regprog); vim_regfree(regmatch.regprog);
// Restore the flag values, they can be used for ":&&". // Restore the flag values, they can be used for ":&&".
do_all = save_do_all; do_all = save_do_all;
do_ask = save_do_ask; do_ask = save_do_ask;
} }
/* /*
* Give message for number of substitutions. * Give message for number of substitutions.