mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <>
Subject Review Request 48164: Suppress all warnings inside googlemock.
Date Thu, 02 Jun 2016 09:31:17 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos and Till Toenshoff.

Repository: mesos


Current clang-3.9.0 `be8f8b5` will always perform a (mostly) syntactic
check that no direct `nullptr` dereferences are performed (emitted as
`-Wnull-dereference`). Dereferencing a `nullptr` is undefined

The bundled googlemock sources contain such an instance when this
template is instantiated (it is):

    template <typename T>
    inline T Invalid() {
      return const_cast<typename remove_reference<T>::type&>(
          *static_cast<volatile typename remove_reference<T>::type*>(NULL));

Note that this was fixed upstream with `b5c81098` which was merged
into googletest `master` on 2014-01-29, but not yet part of a released
version (of which the last one was on 2013-09-19).

As mesos is compiled with `-Werror` and we apply the same kinds of
warning filters to both mesos and googlemock, above code leads to
mesos being rejected by current clang.

In this commit we change the way googlemock headers are added from
`-I` to `-isystem`; the latter of these instructs the compiler to
assume the added path contains system headers which suppresses all
warnings originating from the headers found there.


  src/ c0be66ab28c452e217fe7c7ead8b1b3c283908cc 



Tested on a number of Linux configurations in internal CI.


Benjamin Bannier

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message