diff --git a/src/ioc/db/test/dbChArrTest.cpp b/src/ioc/db/test/dbChArrTest.cpp index 6451fa35a..8a788bed6 100644 --- a/src/ioc/db/test/dbChArrTest.cpp +++ b/src/ioc/db/test/dbChArrTest.cpp @@ -56,11 +56,13 @@ static void createAndOpen(const char *name, dbChannel**pch) testOk((ellCount(&(*pch)->post_chain) == 0), "no filters in post chain"); } +extern "C" { static void freeArray(db_field_log *pfl) { if (pfl->type == dbfl_type_ref) { free(pfl->u.r.field); } } +} static void testHead (const char *title, const char *typ = "") { const char *line = "------------------------------------------------------------------------------"; @@ -197,6 +199,7 @@ static void check(short dbr_type) { static dbEventCtx evtctx; +extern "C" { static void dbChArrTestCleanup(void* junk) { dbFreeBase(pdbbase); @@ -207,6 +210,7 @@ static void dbChArrTestCleanup(void* junk) dbmfFreeChunks(); } +} MAIN(dbChArrTest) { diff --git a/src/std/filters/test/arrTest.cpp b/src/std/filters/test/arrTest.cpp index 3f4fb79c8..026185eac 100644 --- a/src/std/filters/test/arrTest.cpp +++ b/src/std/filters/test/arrTest.cpp @@ -54,9 +54,11 @@ extern "C" { const char *server_port = CA_SERVER_PORT; +extern "C" { static void exitSubroutine(subRecord *precord) { epicsExit((precord->a == 0.0) ? EXIT_SUCCESS : EXIT_FAILURE); } +} static int fl_equals_array(short type, const db_field_log *pfl1, void *p2) { for (int i = 0; i < pfl1->no_elements; i++) { @@ -298,6 +300,7 @@ static void check(short dbr_type) { static dbEventCtx evtctx; +extern "C" { static void arrTestCleanup(void* junk) { dbFreeBase(pdbbase); @@ -308,6 +311,7 @@ static void arrTestCleanup(void* junk) dbmfFreeChunks(); } +} MAIN(arrTest) {