Skip to content

Commit

Permalink
Apply patch from pull request confluentinc#4862 for FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
nassibnassar committed Oct 6, 2024
1 parent 9416dd8 commit 1c2441d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/rdunittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ rd_ut_coverage_check(const char *file, const char *func, int line, int covnr) {
}
/**@}*/

#else

void rd_ut_coverage(const char * /* file */, const char * /* func */, int /* line */, int /* covnr */) {
}


int64_t
rd_ut_coverage_check(const char * /* file */, const char * /* func */, int /* line */, int /* covnr */) {
return 1;
}

#endif /* ENABLE_CODECOV */


Expand Down
8 changes: 4 additions & 4 deletions src/rdunittest.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ int rd_unittest(void);
* @{
*/

void rd_ut_coverage(const char *file, const char *func, int line, int covnr);
int64_t
rd_ut_coverage_check(const char *file, const char *func, int line, int covnr);

#if ENABLE_CODECOV

/* @define When adding new code coverages, use the next value and increment
Expand All @@ -209,10 +213,6 @@ int rd_unittest(void);
rd_ut_coverage_check(__FILE__, __FUNCTION__, __LINE__, COVNR)


void rd_ut_coverage(const char *file, const char *func, int line, int covnr);
int64_t
rd_ut_coverage_check(const char *file, const char *func, int line, int covnr);

#else

/* Does nothing if ENABLE_CODECOV is not set */
Expand Down

0 comments on commit 1c2441d

Please sign in to comment.