Enable -Wextra in C++ builds (#1294)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1294

X-link: https://github.com/facebook/react-native/pull/37383

Add -Wextra to the build, and fixup some more instances of -Wunused-parameter that it sufaces which were not automatically fixable.

Reviewed By: javache

Differential Revision: D45772846

fbshipit-source-id: 29bf71006f63161521fe5869c3a7d8bf7aae9c81
This commit is contained in:
Nick Gerleman
2023-05-11 09:43:36 -07:00
committed by Facebook GitHub Bot
parent a97dbecb49
commit e53d1ee28a
8 changed files with 73 additions and 62 deletions

View File

@@ -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 } \
@@ -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,
};
}