Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: suppress Xcode warnings #3940

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

antond-weta
Copy link
Contributor

Description

When building the code with Xcode ("cmake -G Xcode"), there are 1000+ warnings about implicit 64 to 32 bit conversion.
This change adds a compile option to suppress such warnings when generating an Xcode project.

Tests

None required

Checklist:

  • I have read the contribution guidelines.
  • If this is more extensive than a small change to existing code, I
    have previously submitted a Contributor License Agreement
    (individual, and if there is any way my
    employers might think my programming belongs to them, then also
    corporate).
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

Signed-off-by: Anton Dukhovnikov <[email protected]>
@lgritz lgritz merged commit e3f6665 into AcademySoftwareFoundation:master Aug 11, 2023
23 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Aug 12, 2023
When building the code with Xcode ("cmake -G Xcode"), there are 1000+
warnings about implicit 64 to 32 bit conversion.
This change adds a compile option to suppress such warnings when
generating an Xcode project.

Signed-off-by: Anton Dukhovnikov <[email protected]>
@lgritz
Copy link
Collaborator

lgritz commented Aug 20, 2023

I know I already approved and merged this, but...

Do you have any explanation for why this only was a warning for xcode, and not any of the other compilers (including clang on Apple, when not having CMake generate xcode project files)?

@antond-weta
Copy link
Contributor Author

That particular warning is enabled by default in Xcode ("Implicit Conversion to 32 Bit Type" in Xcode project settings), so it has to be explicitly disabled in the project file.

@lgritz
Copy link
Collaborator

lgritz commented Aug 20, 2023

Are we confident that it's not a warning we should be addressing -- i.e., disabling the warning could lead to bugs and we should really aim to be fixing the places where the warning occurs?

@antond-weta
Copy link
Contributor Author

Are we confident that it's not a warning we should be addressing -- i.e., disabling the warning could lead to bugs and we should really aim to be fixing the places where the warning occurs?

That would be good. Actually, I might just give it a go and try fixing as many as I can.

@lgritz
Copy link
Collaborator

lgritz commented Aug 22, 2023

I guess the question is -- are there really thousands of separate places that are just too painful to fix? Or is it in a header and fixing it there will simultaneously fix a whole lot of the warnings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants