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

Clang fixes #8

Merged
merged 3 commits into from
Jul 14, 2013
Merged

Clang fixes #8

merged 3 commits into from
Jul 14, 2013

Conversation

nathanstitt
Copy link
Collaborator

This fixes a few bugs I've encountered when running on osx and using a clang compiled Ruby. The most surprising one was the missing return statement, I'm have no idea how/why gcc allowed that.

I've made several other changes as well: nathanstitt/cups@m0wfo:master...master and will be submitting pull requests for them separately.

As always - I'll be glad to rework if you'd like something done differently.

Thanks again!

The cupsFreeJobs and job_state check were inside the for loop.
Therefore when the job was found and 'break' issued, the loop would exit
and cupsFreeJob and the job_state check would never get called.
URL is later assigned from cupsServer(), which returns const char*.
I'm guessing that it only functioned due to how gcc compiled it.  When
compiled with clang, renders library unusable due to every call
raising "The printer or destination doesn't exist!"
@nathanstitt
Copy link
Collaborator Author

By the way - I've released the rest api I've developed using cups at: https://github.com/nathanstitt/restful-printing It's still very green, but is seing light production use.

m0wfo added a commit that referenced this pull request Jul 14, 2013
@m0wfo m0wfo merged commit 688b403 into m0wfo:master Jul 14, 2013
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.

None yet

2 participants