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

Remove trailing comma in redisConnectionType enum #479

Merged
merged 1 commit into from
Nov 4, 2016

Conversation

DonaldWhyte
Copy link
Contributor

Remove trailing comma in last value of redisConnectionType enum. This causes a compiler warning on Solaris compilers. I'd like to build this on Solaris with -Werror. However, due to the trailing comma, I cannot do that.

This PR removes the trailing comma, which should prevent it causing compiler warnings on any architecture.

Remove trailing comma in last value of `redisConnectionType` enum. This causes a compiler warning on Solaris compilers. I'd like to build this on Solaris with `-Werror`. However, due to the trailing comma, I cannot do that.

This PR removes the trailing comma, which should prevent it causing compiler warnings on any architecture.
@badboy
Copy link
Contributor

badboy commented Oct 25, 2016

Who the hell made trailing commas in enum definitions a warning on Solaris?

@DonaldWhyte
Copy link
Contributor Author

DonaldWhyte commented Oct 25, 2016

Yes, it's an interesting choice. This offers an explanation:

http://stackoverflow.com/questions/6372650/trailing-commas-and-c

The Solaris compiler used is C++03 (a fully C++11-conformant Solaris compiler currently does not exist sadly). C++03 tries to be backwards compatible with C89, which does not allow trailing commas.

C99 does allow trailing commas, and only C++11 has caught up with C99 by also allowing them.

As long as we're stuck with C++03-ish compilers for Solaris, trailing commas will be an issue.

@DonaldWhyte
Copy link
Contributor Author

Is this good to land?

@badboy
Copy link
Contributor

badboy commented Nov 4, 2016

I guess, yes.

@badboy badboy merged commit afdef3e into redis:master Nov 4, 2016
@DonaldWhyte DonaldWhyte deleted the patch-1 branch November 4, 2016 14:22
@DonaldWhyte
Copy link
Contributor Author

Thanks @badboy!

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