Commit 8aa1a411 authored by Joe Loser's avatar Joe Loser Committed by Facebook Github Bot

Fix master branch broken for Clang

Summary:
Clang does not support the warning option "-Wclobbered", so we cannot
do a pragma push and pop for this warning. So, we push and pop this
particular warning for GCC only.

As it stands currently, Clang accepts `#pragma GCC` directives. If this
sort of thing comes up more in the future, it may make sense for Folly
to define a macro for easily disabling warnings for either just GCC or
just Clang.

simpkins yfeldblum
Closes https://github.com/facebook/folly/pull/779

Reviewed By: simpkins

Differential Revision: D7059916

Pulled By: yfeldblum

fbshipit-source-id: a6d420dc6ae435e3be1229b2bb421910bc8794ff
parent 13681962
......@@ -313,8 +313,11 @@ void Subprocess::spawn(
// With -Wclobbered, gcc complains about vfork potentially cloberring the
// childDir variable, even though we only use it on the child side of the
// vfork.
FOLLY_PUSH_WARNING
#if !defined(__clang__)
FOLLY_GCC_DISABLE_WARNING("-Wclobbered")
#endif
void Subprocess::spawnInternal(
std::unique_ptr<const char*[]> argv,
const char* executable,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment