diff --git a/lib/Makefile b/lib/Makefile index 4cf298a1..0c687ed0 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -32,20 +32,17 @@ #LDFLAGS = # Debug mode flags -CFLAGS = -g -DDEBUG -Wall -fPIC +CFLAGS = -g -DDEBUG -Wall LDFLAGS = -g # Profile mode flags -#CFLAGS = -O3 -pg -DDEBUG -fPIC +#CFLAGS = -O3 -pg -DDEBUG #LDFLAGS = -pg # Code Coverage with lcov flgs #CFLAGS = -ftest-coverage -fprofile-arcs #LDFLAGS = -g - -CFLAGS += -fPIC - all:libSaClm.a libSaClm.so.1.0 libSaAmf.a libSaAmf.so.1.0 libSaCkpt.a \ libSaCkpt.so.1.0 libSaEvt.a libSaEvt.so.1.0 libais.a libais.so.1.0 libevs.a \ libevs.so.1.0 @@ -113,6 +110,10 @@ clean: rm -f *.o libais.so* libais.a libSaClm.so* libSaClm.a* libSaAmf.so* libSaAmf.a \ libSaCkpt.so* libSaCkpt.a* libSaEvt.so* libSaEvt.a libevs.so* libevs.a \ *.da *.bb *.bbg + +# -fPIC rules required for all libraries +%.o: %.c + $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c depend: makedepend -Y -- $(CFLAGS) $(LIBAIS_SRC) > /dev/null 2>&1 diff --git a/lib/amf.c b/lib/amf.c index 50b367bf..8913cf64 100644 --- a/lib/amf.c +++ b/lib/amf.c @@ -110,7 +110,7 @@ saAmfInitialize ( struct amfInstance *amfInstance; SaErrorT error = SA_OK; - error = saVersionVerify (&amfVersionDatabase, version); + error = saVersionVerify (&amfVersionDatabase, (SaVersionT *)version); if (error != SA_OK) { goto error_no_destroy; } diff --git a/lib/ckpt.c b/lib/ckpt.c index b3040b38..af98f1d7 100644 --- a/lib/ckpt.c +++ b/lib/ckpt.c @@ -139,8 +139,6 @@ static struct saVersionDatabase ckptVersionDatabase = { */ void ckptHandleInstanceDestructor (void *instance) { -struct ckptInstance *ckptInstance = (struct ckptInstance *)instance; - } void checkpointHandleInstanceDestructor (void *instance) diff --git a/lib/evs.c b/lib/evs.c index 00bd8f8d..e5473470 100644 --- a/lib/evs.c +++ b/lib/evs.c @@ -569,12 +569,10 @@ evs_error_t evs_membership_get ( pthread_mutex_unlock (&evs_inst->response_mutex); if (error != SA_OK) { - printf ("error\n"); goto error_exit; } error = res_lib_evs_membership_get.header.error; - printf ("members is %d\n", res_lib_evs_membership_get.member_list_entries); /* * Copy results to caller