[Gammaray-commits] [KDAB/GammaRay] 557a73: qCDebug(...) & friends: Avoid warnings from Clang

Kevin Funk kevin.funk at kdab.com
Thu Apr 27 11:50:47 CEST 2017


  Branch: refs/heads/2.7
  Home:   https://github.com/KDAB/GammaRay
  Commit: 557a738c9ee0e27d885a4a88c3803a21a9e0fb69
      https://github.com/KDAB/GammaRay/commit/557a738c9ee0e27d885a4a88c3803a21a9e0fb69
  Author: Kevin Funk <kevin.funk at kdab.com>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M CMakeLists.txt

  Log Message:
  -----------
  qCDebug(...) & friends: Avoid warnings from Clang

Warning:
```
[228/1019] Building CXX object common/CMakeFiles/gammaray_common.dir/endpoint.cpp.o
gammaray/common/endpoint.cpp:139:36: warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]
  qCWarning(networkstatistics) << "TX: \t" << (m_bytesTransferred * 8 / 1024.0 / 1024.0) << "Mbps";
                             ^
```

Passing -Wno-gnu-zero-variadic-macro-arguments fixes it

(cherry picked from commit fc08fabfcea6ffe5452717930ff9f7bd66c1bc46)


  Commit: 53b08f66436af91be5fb26d9e3288b5b49cf6208
      https://github.com/KDAB/GammaRay/commit/53b08f66436af91be5fb26d9e3288b5b49cf6208
  Author: Kevin Funk <kevin.funk at kdab.com>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
    M CMakeLists.txt

  Log Message:
  -----------
  CMake: Prep for changes re. compiler id for Clang

"As of CMake 3.0.0 the CMAKE_<LANG>_COMPILER_ID value for Apple-provided
Clang is now AppleClang. To test for both the Apple-provided Clang and
the regular Clang use the following if condition:"

```
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  # using regular Clang or AppleClang
endif()
```

See: http://stackoverflow.com/a/10055571/592636


Compare: https://github.com/KDAB/GammaRay/compare/1669f45be79b...53b08f66436a


More information about the Gammaray-commits mailing list