Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable -Wextra in C++ builds #1294

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Yoga.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Pod::Spec.new do |spec|
'-fexceptions',
'-Wall',
'-Werror',
'-Wextra',
'-std=c++14',
'-fPIC'
]
Expand Down
5 changes: 4 additions & 1 deletion benchmark/YGBenchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#define YGBENCHMARKS(BLOCK) \
int main(int argc, char const* argv[]) { \
(void) argc; \
(void) argv; \
clock_t __start; \
clock_t __endTimes[NUM_REPETITIONS]; \
{ BLOCK } \
Expand Down Expand Up @@ -78,9 +80,10 @@ static YGSize _measure(
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
(void) node;
return (YGSize){
.width = widthMode == YGMeasureModeUndefined ? 10 : width,
.height = heightMode == YGMeasureModeUndefined ? 10 : width,
.height = heightMode == YGMeasureModeUndefined ? 10 : height,
};
}

Expand Down
1 change: 1 addition & 0 deletions cmake/project-defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ add_compile_options(
-fexceptions
# Enable warnings and warnings as errors
-Wall
-Wextra
-Werror
# Disable RTTI
$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
Expand Down
Loading