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

Add LOGGER_ASSERT for checking fatal error conditions. #1230

Merged
merged 1 commit into from
Oct 19, 2018

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Oct 8, 2018

These are not compiled out under NDEBUG and should be provably correct.


This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Oct 8, 2018
Copy link
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @iphydf)


toxcore/logger.c, line 107 at r1 (raw file):

        log = &logger_stderr;
#else
        fprintf(stderr, "NULL logger not permitted\n");

Since this is a direct fprintf statement, punctuation would be appropriate, no?


toxcore/tox.c, line 1135 at r1 (raw file):

set_message

I get that the case is here for documentation purposes but it's still superfluous

Copy link
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @iphydf)


toxcore/tox.c, line 1135 at r1 (raw file):

Previously, hugbubby wrote…
set_message

I get that the case is here for documentation purposes but it's still superfluous

(meant to point to case -5: and not set_message)

Copy link
Member Author

@iphydf iphydf left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @hugbubby)


toxcore/logger.h, line 103 at r1 (raw file):

Previously, hugbubby wrote…

Capitalize the A here

Done.


toxcore/logger.c, line 107 at r1 (raw file):

Previously, hugbubby wrote…

Since this is a direct fprintf statement, punctuation would be appropriate, no?

Done.


toxcore/tox.c, line 1135 at r1 (raw file):

Previously, hugbubby wrote…

(meant to point to case -5: and not set_message)

Done.

Copy link
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r2.
Reviewable status: 1 change requests, 0 of 1 approvals obtained

@hugbubby
Copy link
Member

Wouldn't know what Travis is complaining about, but I approved it because it LGTM

These are not compiled out under `NDEBUG` and should be provably correct.
@iphydf iphydf force-pushed the logger-assert branch 2 times, most recently from 174585f to aa5c782 Compare October 19, 2018 18:08
@iphydf iphydf merged commit aa5c782 into TokTok:master Oct 19, 2018
@iphydf iphydf deleted the logger-assert branch October 19, 2018 18:16
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.9 Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants