Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

insert explicit casts to calm compiler warnings for -Wsign-conversion#5591

Closed
mpsuzuki wants to merge 1 commit into
apple:masterfrom
mpsuzuki:cast-explicitly
Closed

insert explicit casts to calm compiler warnings for -Wsign-conversion#5591
mpsuzuki wants to merge 1 commit into
apple:masterfrom
mpsuzuki:cast-explicitly

Conversation

@mpsuzuki

@mpsuzuki mpsuzuki commented Jun 7, 2019

Copy link
Copy Markdown
Contributor

During compilation of the latest source, I received several warnings for -WSign-conversion. Here is a patch inserting explicit casts to calm them.

@michaelrsweet michaelrsweet self-assigned this Jun 10, 2019
@michaelrsweet michaelrsweet added this to the CUPS 2.3.x milestone Jun 10, 2019
@michaelrsweet

Copy link
Copy Markdown
Contributor

Sigh... This is all because the newest GCC defaults to unsigned enums... Will consider for 2.3.x.

@mpsuzuki

Copy link
Copy Markdown
Contributor Author

I see. How about add "-Wno-sign-conversion" to CFLAGS as quick workaround?

@michaelrsweet

Copy link
Copy Markdown
Contributor

@mpsuzuki The problem with -Wno-sign-conversion is that it also eliminates valid issues, like between size_t and ssize_t, that we want to see reported.

@michaelrsweet

Copy link
Copy Markdown
Contributor

Merged mostly as-is...

[master 8ef4f50] Eliminate new GCC compiler warnings (Issue #5591)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants