Skip to content

Add LOGGER_ASSERT for checking fatal error conditions.#1230

Merged
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:logger-assert
Oct 19, 2018
Merged

Add LOGGER_ASSERT for checking fatal error conditions.#1230
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:logger-assert

Conversation

@iphydf

@iphydf iphydf commented Oct 8, 2018

Copy link
Copy Markdown
Member

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

@hugbubby hugbubby left a comment

Copy link
Copy Markdown
Member

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

@hugbubby hugbubby left a comment

Copy link
Copy Markdown
Member

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)

@iphydf iphydf left a comment

Copy link
Copy Markdown
Member Author

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.

@hugbubby hugbubby left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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