Bug 1355699 - Suppress -Wunused-private-field warning-as-error in js/src/wasm/WasmTypes.h. r?luke
This clang warning-as-error (from
bug 1334504) breaks the SpiderMonkey ARM Simulator Build on macOS. By changing member variable `padding_` from private to protected, clang will no longer warn because it doesn't know whether some derived class might actually use `padding_`.
js/src/wasm/WasmTypes.h:1522:11: warning: private field 'padding_' is not used [-Wunused-private-field]
MozReview-Commit-ID: LB3yoYQCFj5
--- a/js/src/wasm/WasmTypes.h
+++ b/js/src/wasm/WasmTypes.h
@@ -1624,17 +1624,19 @@ class DebugFrame
bool hasCachedSavedFrame_ : 1;
bool hasCachedReturnJSValue_ : 1;
};
void* flagsWord_;
};
// Padding so that DebugFrame has Alignment.
#if JS_BITS_PER_WORD == 32
+ protected: // suppress clang's -Wunused-private-field warning-as-error
void* padding_;
+ private:
#endif
// The Frame goes at the end since the stack grows down.
Frame frame_;
public:
Frame& frame() { return frame_; }
uint32_t funcIndex() const { return funcIndex_; }