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

*nix fixes #393

Merged
merged 3 commits into from
Apr 6, 2014
Merged

*nix fixes #393

merged 3 commits into from
Apr 6, 2014

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Feb 9, 2014

I keep bundling these in with other things, and they end up not getting merged as a result of those other things, so here's a PR with just the 3 fixes that keep bugging me :P

  • Fix for a clang warning in plPythonPack about size_t comparison with -1.
  • Fix for warnings about plFileSystem using mktemp.
  • Fix for semaphores on *nix being used without ever being initialized.
  • Fix for semaphore TryWait not working on *nix.

@branan
Copy link
Member

branan commented Feb 9, 2014

👍 All looks sane to me

@@ -563,7 +563,7 @@ plFileName plFileSystem::GetTempFilename(const char *prefix, const plFileName &p
size_t temp_len = tmpdir.GetSize() + strlen(prefix) + 7;
char *temp = new char[temp_len + 1];
snprintf(temp, temp_len + 1, "%s/%sXXXXXX", tmpdir.AsString().c_str(), prefix);
mktemp(temp);
mkstemp(temp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mkstemp() returns an open file descriptor... This should probably not be ignored >.>

@dpogue
Copy link
Member Author

dpogue commented Apr 6, 2014

Updated, should be good to go.

zrax added a commit that referenced this pull request Apr 6, 2014
@zrax zrax merged commit 50d16c3 into H-uru:master Apr 6, 2014
@dpogue dpogue deleted the nix-fix branch April 12, 2014 18:49
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

3 participants