There is an old question on Stack Overflow from years ago, asking about a similar issue: xcode4.2 - Disable warnings in Xcode from frameworks - Stack Overflow. While things have not changed in Xcode 10, the problem I am facing is kind of different.
I have the PCL (point cloud library) and other libraries included from my source files. So the compiler checks these headers and source files, then gives me warnings on those files. But I cannot silent these warnings using the method mentioned in the old post. And I should not silent globally, which is not a best practice and not safe.
If I were to use the second method mentioned in the old post, I would need those files to be included in the Build Phase - Compile Source list. But I do not see those problematic files in the Build Phase page – because they are #include
files.
How do I silent warnings from PCL headers and sources?
By the way, I am using libc++
since libstdc++
will result in upstream
cannot be found by the compiler. (Even though some 2014-2016 blog posts recommend libstdc++
. It seems that libstdc++
is deprecated in Xcode 10?)
Warnings include:
- Semantic Issue
- 'SomeFunction' overrides a member function but is not marked 'override'
- Value Conversion Issue
- Implicit conversion loses integer precision: 'vtkIdType' (aka 'long long') to 'int'
- Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int'
- Implicit conversion loses integer precision: 'unsigned long' to 'int'
- Deprecations
- 'ImmediateModeRenderingOn' is deprecated