1

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

enter image description here

enter image description here

enter image description here

jackxujh
  • 983
  • 10
  • 31
  • “You forgot to say `override`” is a style warning. There’s **lots** of code that doesn’t use `override`, and nobody in their right mind is going to hunt through all their code for places where they could put it. Turn that warning off. – Pete Becker Nov 03 '18 at 02:33
  • @PeteBecker I added other types of warnings that are present which were truncated in the screenshots, including *value conversion* and *deprecations*. How do I silent some specific types of warnings just for these specific included source files? – jackxujh Nov 05 '18 at 07:05

0 Answers0