Skip to content

Commit 2733bad

Browse files
committed
Fix for Misc elements issues #216 Item 7 (Warnings as errors)
1 parent dab3308 commit 2733bad

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ endif()
178178
# Get rid of certain warnings, and make msvc support utf-8 without adding bom
179179

180180
target_compile_options(elements PRIVATE
181-
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wpedantic -ftemplate-backtrace-limit=0>
182-
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wpedantic -ftemplate-backtrace-limit=0>
183-
$<$<CXX_COMPILER_ID:AppleClang>:-Wall -Wpedantic -ftemplate-backtrace-limit=0>
181+
$<$<CXX_COMPILER_ID:GNU>:-Werror -Wall -Wextra -Wpedantic -ftemplate-backtrace-limit=0>
182+
$<$<CXX_COMPILER_ID:Clang>:-Werror -Wall -Wpedantic -ftemplate-backtrace-limit=0>
183+
$<$<CXX_COMPILER_ID:AppleClang>:-Werror -Wall -Wpedantic -ftemplate-backtrace-limit=0>
184184
$<$<CXX_COMPILER_ID:MSVC>:/W4 /wd4244 /wd4305 /wd4996 /wd4267 /wd4018 /utf-8>
185185
)
186186

@@ -191,7 +191,7 @@ endif()
191191

192192
if (APPLE)
193193
# Not sure why APPLE is not picking the target_compile_options above
194-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -ftemplate-backtrace-limit=0")
194+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic -ftemplate-backtrace-limit=0")
195195
endif()
196196

197197
###############################################################################

lib/include/elements/element/slider.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace cycfi { namespace elements
135135

136136
template <size_t num_states>
137137
inline bool selector_base<num_states>::scroll(
138-
context const& ctx, point dir, point p)
138+
context const& /* ctx */, point /* dir */, point /* p */)
139139
{
140140
// We don't allow selector move via the scroll wheel.
141141
return false;
@@ -185,7 +185,7 @@ namespace cycfi { namespace elements
185185

186186
template <unsigned size>
187187
inline view_limits basic_thumb_element<size>
188-
::limits(basic_context const& ctx) const
188+
::limits(basic_context const& /* ctx */) const
189189
{
190190
auto pt = point{ float(size), float(size) };
191191
return view_limits{ pt, pt };
@@ -234,7 +234,7 @@ namespace cycfi { namespace elements
234234

235235
template <unsigned size, bool vertical>
236236
inline view_limits basic_track_element<size, vertical>
237-
::limits(basic_context const& ctx) const
237+
::limits(basic_context const& /* ctx */) const
238238
{
239239
auto sz = float(size);
240240
auto min_length_ = float(min_length);

0 commit comments

Comments
 (0)