Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
fix to remove configASSERT() in Release build
Browse files Browse the repository at this point in the history
  • Loading branch information
stde authored and stde committed Apr 6, 2021
1 parent 6f8831b commit 5c7c72a
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ extern void vLoggingPrintf(const char * pcFormat, ...);
extern void vLoggingPrint(const char * pcMessage);
#define configPRINT(X) vLoggingPrint(X)

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif /* __STDC__ || __cplusplus__ */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ extern void vLoggingPrintf(const char * pcFormat, ...);
extern void vLoggingPrint(const char * pcMessage);
#define configPRINT(X) vLoggingPrint(X)

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ extern void vLoggingPrintf(const char * pcFormat, ...);
extern void vLoggingPrint(const char * pcMessage);
#define configPRINT(X) vLoggingPrint(X)

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif /* __STDC__ || __cplusplus__ */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ extern void vLoggingPrintf(const char * pcFormat, ...);
extern void vLoggingPrint(const char * pcMessage);
#define configPRINT(X) vLoggingPrint(X)

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ extern void vLoggingPrintf(const char * pcFormat, ...);
extern void vLoggingPrint(const char * pcMessage);
#define configPRINT(X) vLoggingPrint(X)

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif /* __STDC__ || __cplusplus__ */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ extern void vLoggingPrintf( const char * pcFormat, ... );
extern void vLoggingPrint( const char * pcMessage );
#define configPRINT( X ) vLoggingPrint( X )

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ extern void vLoggingPrintf(const char * pcFormat, ...);
extern void vLoggingPrint(const char * pcMessage);
#define configPRINT(X) vLoggingPrint(X)

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif /* __STDC__ || __cplusplus__ */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ extern void vLoggingPrintf(const char * pcFormat, ...);
extern void vLoggingPrint(const char * pcMessage);
#define configPRINT(X) vLoggingPrint(X)

#ifdef DEBUG
/* Assert call defined for debug builds. */
extern void vAssertCalled(const char * pcFile,
uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
extern void vAssertCalled(const char * pcFile, uint32_t ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__)
#else
#define configASSERT(x)
#endif /* DEBUG */

#endif

Expand Down

0 comments on commit 5c7c72a

Please sign in to comment.