mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 15:05:27 +08:00
Enable strict-aliasing and implicit-fallthrough warnings
GCC needs to have the comment *right before* the case label... blergh
This commit is contained in:
parent
4e8c0f757d
commit
005d3a5981
@ -39,6 +39,7 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
|
||||
endif()
|
||||
|
||||
# Enable a whole bunch of warnings, but turn off:
|
||||
# - implicit fallthrough because that does not recognize some cases where it's desired (and I *really* want this one!)
|
||||
# - comment because we use a bunch of those, and they're not really all that harmful.
|
||||
@ -46,10 +47,8 @@ endif()
|
||||
# - strict-aliasing, because on old GCCs (*Travis*) those are triggered by maybe.h, so you get it every time it is included.
|
||||
# - redundant-move, because we have one that is required on old libc
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra \
|
||||
-Wno-implicit-fallthrough \
|
||||
-Wno-comment \
|
||||
-Wno-address \
|
||||
-Wno-strict-aliasing \
|
||||
")
|
||||
|
||||
# Disable exception handling.
|
||||
|
@ -2941,9 +2941,9 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
|
||||
parser().libdata().is_repaint = false;
|
||||
break;
|
||||
}
|
||||
// Else we repaint as normal.
|
||||
/* fallthrough */
|
||||
// Else we repaint as normal
|
||||
}
|
||||
/* fallthrough */
|
||||
case rl::force_repaint:
|
||||
case rl::repaint: {
|
||||
parser().libdata().is_repaint = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user