diff --git a/bruker.c b/bruker.c index a7b0d2a..a0151b0 100644 --- a/bruker.c +++ b/bruker.c @@ -234,7 +234,7 @@ int BrukerReadCurrent(pEVControl pEva, float *fField) static int BrukerGet(pEVDriver pEva, float *fValue) { pBrukerDriv self = NULL; - int iRet, iSign = 1; + int iRet=0, iSign = 1; char pBueffel[80]; char pCommand[6]; char *pPtr, *pSign = NULL; @@ -283,7 +283,7 @@ static int BrukerGet(pEVDriver pEva, float *fValue) static int BrukerRun(pEVDriver pEva, float fVal) { pBrukerDriv self = NULL; - int iRet; + int iRet =0; char pBueffel[80]; char pCommand[40]; char *pPtr; diff --git a/ease.c b/ease.c index cdc1f56..036696d 100644 --- a/ease.c +++ b/ease.c @@ -754,7 +754,7 @@ static int EaseInit(SConnection * pCon, EaseBase * eab, int argc, : */ - int port, iRet, i; + int port=0, iRet, i; rs232 *ser; char *colon, *host; char buf[64]; diff --git a/faverage.c b/faverage.c index 6d5ccde..e612ed4 100644 --- a/faverage.c +++ b/faverage.c @@ -73,7 +73,7 @@ int FocusAverageDo(SConnection * pCon, SicsInterp * pSics, void *pData, pSicsVariable var1 = NULL; pSicsVariable var2 = NULL; pSicsVariable var3 = NULL; - int lbank, mbank, ubank; + int lbank=0, mbank=0, ubank=0; self = (pFocusAverager) pData; assert(self); @@ -330,7 +330,7 @@ int MakeFA(SConnection * pCon, SicsInterp * pSics, void *pData, pSicsVariable var1 = NULL; pSicsVariable var2 = NULL; pSicsVariable var3 = NULL; - int lbank, mbank, ubank; + int lbank=0, mbank=0, ubank=0; assert(pCon); assert(pSics); @@ -432,7 +432,7 @@ HistInt *CheckBank(pFocusAverager self, SConnection * pCon, HistInt *mData = NULL; HistInt *uData = NULL; HistInt *mergData = NULL; - int lbank, mbank, ubank; + int lbank=0, mbank=0, ubank=0; if (iBank == 2) { var2 = FindVariable(pServ->pSics, "mbank"); diff --git a/hardsup/makefile_macosx b/hardsup/makefile_macosx new file mode 100644 index 0000000..9666ea6 --- /dev/null +++ b/hardsup/makefile_macosx @@ -0,0 +1,18 @@ +#--------------------------------------------------------------------------- +# Makefile for the SINQ hardware support library +# with libraries installed unde r/usr/local +# +# Mark Koennecke, November 1996 +# Markus Zolliker, March 2003 +# Mark Koennecke, December 2009 +#-------------------------------------------------------------------------- + +include $(SICSROOT)/sics/linux_def + +CC = clang +CFLAGS = -g -DLINUX $(DFORTIFY) -I. -I$(SICSROOT)/sics -MMD -Wall -Wno-unused + +include make_gen + +-include $(OBJ:.o=.d) + diff --git a/makefile_linux b/makefile_linux index 9aa84be..5c1b1fb 100644 --- a/makefile_linux +++ b/makefile_linux @@ -8,8 +8,8 @@ # Mark Koennecke, February 2014 #========================================================================== -#include ../linux_def -include $(SICSROOT)/sics/sllinux_def +include $(SICSROOT)/sics/linux_def +#include $(SICSROOT)/sics/sllinux_def CC = gcc diff --git a/makefile_macosx b/makefile_macosx new file mode 100644 index 0000000..7619368 --- /dev/null +++ b/makefile_macosx @@ -0,0 +1,25 @@ +#--------------------------------------------------------------------------- +# Makefile for SICS +# with libraries installed under /usr/local +# +# Mark Koennecke 1996-2001 +# Markus Zolliker, March 2003 +# Mark Koennecke, December 2009 +# Mark Koennecke, February 2014 +#========================================================================== + +include $(SICSROOT)/sics/linux_def +#include $(SICSROOT)/sics/sllinux_def + + +CC = clang +CFLAGS = -I$(HDFROOT)/include -I/usr/pkg/include -DHDF5 $(NI) -I$(TCLINC) -Ihardsup \ + -I$(SICSROOT)/sics -I.. -I. -MMD -DCYGNUS -DNONINTF $(DBG) \ + $(DFORTIFY) -Wall -Wno-unused -Wunused-value -Wno-comment \ + -Wno-switch -Werror + +EXTRA=nintf.o + +include make_gen + +-include $(OBJ:.o=.d) diff --git a/sinq.c b/sinq.c index 84d362e..5703f49 100644 --- a/sinq.c +++ b/sinq.c @@ -31,7 +31,7 @@ #include #include "dgrambroadcast.h" -#include +#include "sinq.h" #include #ifdef SEND_PORT diff --git a/sinqhmdriv.c b/sinqhmdriv.c index d28fa1a..e55923b 100644 --- a/sinqhmdriv.c +++ b/sinqhmdriv.c @@ -635,7 +635,7 @@ static int SQStatus(pHistDriver self, SConnection * pCon) COUNTID); if (pCountInt) { status = pCountInt->CheckCountStatus(pInternal->pCounter, pCon); - if ((status == HWFault)) { + if (status == HWFault) { ReleaseCountLock(pCountInt); return status; } diff --git a/tasscan.c b/tasscan.c index 648b5d4..461012a 100644 --- a/tasscan.c +++ b/tasscan.c @@ -138,7 +138,7 @@ static char *findLastPoint(char *text) static int TASHeader(pScanData self) { pTASdata pTAS = (pTASdata) self->pSpecial; - int i, iCount, status, iFileNO; + int i, iCount, status, iFileNO=0; char pBueffel[1024], pHeader[1024], pWork[132], pWork2[60], pTen[12], *pcPtr; time_t iDate; @@ -152,7 +152,7 @@ static int TASHeader(pScanData self) pIDrivable pDrive = NULL; pEVControl pTem = NULL; pSicsVariable sVar = NULL; - float f1, f2, f3, f4; + float f1=.0, f2=.0, f3=.0, f4=.0; assert(self); assert(pTAS); diff --git a/tclClock.c b/tclClock.c index 3c641d6..aca08db 100644 --- a/tclClock.c +++ b/tclClock.c @@ -18,6 +18,9 @@ #include #include + + + #include typedef long TIMEZONE_t; diff --git a/tdchm.c b/tdchm.c index a6f09e2..6977f4c 100644 --- a/tdchm.c +++ b/tdchm.c @@ -207,8 +207,8 @@ static int enableTdc(pTdc self) */ in.c = 0; in.b = self->range; - in.d = (char) ((self->n >> 8) && 255); - in.e = (char) (self->n && 255); + in.d = (char) ((self->n >> 8) & 255); + in.e = (char) (self->n & 255); return ecbExecute(self->tdc, 131, in, &out); } @@ -286,7 +286,7 @@ static int TDCHalt(pHistDriver self) static int TDCCountStatus(pHistDriver self, SConnection * pCon) { pTdc tdc = NULL; - int tdcstatus, status; + int tdcstatus, status = HWFault; float fControl, fOldControl; MonEvent sMon; diff --git a/tecs/makefile_macosx b/tecs/makefile_macosx index 8166989..be96310 100644 --- a/tecs/makefile_macosx +++ b/tecs/makefile_macosx @@ -7,7 +7,7 @@ include macosx_def -CC = gcc +CC = clang FC = g77 CFLAGS = -DLINUX -I.. -I../.. -g $(DFORTIFY) FFLAGS = -Wimplicit -g diff --git a/tecsdriv.c b/tecsdriv.c index b214a83..35319c5 100644 --- a/tecsdriv.c +++ b/tecsdriv.c @@ -93,7 +93,7 @@ int TecsWrapper(SConnection * pCon, SicsInterp * pSics, void *pData, { pEVControl self = NULL; char pBueffel[1024], result[1024], *res; - int iRet; + int iRet = -1; pEVDriver pD; pTecsDriv pMe; float fVal;