Added extern "C" wrappers to clean up some Solaris warnings

This commit is contained in:
Andrew Johnson
2016-02-26 13:50:39 -06:00
parent 217f515985
commit 4f2f910d09
2 changed files with 8 additions and 0 deletions

View File

@@ -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)
{

View File

@@ -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)
{