Skip to content

Replace assert() calls with CY_ASSERT() macro and add CY_CONFIG_HEADER - #72

Merged
pavel-kirienko merged 12 commits into
OpenCyphal-Garage:mainfrom
bjsowa:feat/cy-assert-macro
Jul 24, 2026
Merged

Replace assert() calls with CY_ASSERT() macro and add CY_CONFIG_HEADER#72
pavel-kirienko merged 12 commits into
OpenCyphal-Garage:mainfrom
bjsowa:feat/cy-assert-macro

Conversation

@bjsowa

@bjsowa bjsowa commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread cy/cy.h Outdated
@bjsowa
bjsowa marked this pull request as ready for review July 24, 2026 15:28
Comment thread cy/cy_platform.h Outdated

#include "cy.h"
#include <stdint.h>
#include <stdlib.h>

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.

@bjsowa do we really need this here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

must have been some residue

@pavel-kirienko pavel-kirienko 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.

Aside from the apparently unnecessary #include <stdlib.h>, we also have no longer needed #include <assert.h> in cy_can_socketcan.c and udp_wrapper.c.

Comment thread cy/cy.h
#define CY_ASSERT(x) assert(x)
#endif

#define WKV_ASSERT(x) CY_ASSERT(x)

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.

Suggested change
#define WKV_ASSERT(x) CY_ASSERT(x)
#ifndef WKV_ASSERT
#define WKV_ASSERT(x) CY_ASSERT(x)
#endif

@bjsowa
bjsowa requested a review from pavel-kirienko July 24, 2026 18:26
@pavel-kirienko
pavel-kirienko merged commit 4964023 into OpenCyphal-Garage:main Jul 24, 2026
8 checks passed
@bjsowa
bjsowa deleted the feat/cy-assert-macro branch July 24, 2026 20:12
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.

2 participants