Skip to content

Comments

Clang fixes#16

Open
ChrisLundquist wants to merge 3 commits intowfarr:masterfrom
ChrisLundquist:clang-fixes
Open

Clang fixes#16
ChrisLundquist wants to merge 3 commits intowfarr:masterfrom
ChrisLundquist:clang-fixes

Conversation

@ChrisLundquist
Copy link

I was trying to compile this with clang on OS X and hit a few issues.

The commit messages contain more detail, but the highlights are:

  • I had to pass -I/usr/local/nagios/include to compile because I installed from source.
  • clang seems to need -D_XOPEN_SOURCE=600 to give you strdup with -std=c99.
  • Fix for edge case if malloc doesn't calloc by default

error: variable 'minutes' is used uninitialized whenever 'if' condition
is false [-Werror,-Wsometimes-uninitialized]

This points out a rare edge case that "rest" isn't passed and minutes is
initialized to garbage like 4123476234. We might set
downtime to a longer than expected interval if this happened.
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.

1 participant