Commit 30146823 authored by Alois SCHLOEGL's avatar Alois SCHLOEGL

several compiler warnings are addressed

parent 51cad0aa
......@@ -1828,7 +1828,7 @@ static void ClampexToABF1_x( float *Param, char *ADCLabel, char *DACLabel,
pFH->fArithmeticK4 = 0.0F;
pFH->fArithmeticK5 = 0.0F;
pFH->fArithmeticK6 = 0.0F;
strncpy(pFH->sArithmeticOperator, "+ ", ABF_ARITHMETICOPLEN);
memcpy(pFH->sArithmeticOperator, "+ ", ABF_ARITHMETICOPLEN);
pFH->nArithmeticExpression = ABF_SIMPLE_EXPRESSION;
// GROUP #13 (20 bytes) - On-line subtraction.
......
......@@ -117,7 +117,7 @@ void WINAPI ABFH_Initialize( ABFFileHeader *pFH )
char szName[13];
sprintf(szName, "AI #%-8d", i);
strncpy(NewFH.sADCChannelName[i], szName, ABF_ADCNAMELEN);
strncpy(NewFH.sADCUnits[i], "pA ", ABF_ADCUNITLEN);
memcpy(NewFH.sADCUnits[i], "pA ", ABF_ADCUNITLEN);
NewFH.nADCPtoLChannelMap[i] = short(i);
NewFH.nADCSamplingSeq[i] = ABF_UNUSED_CHANNEL;
......@@ -139,7 +139,7 @@ void WINAPI ABFH_Initialize( ABFFileHeader *pFH )
char szName[13];
sprintf(szName, "AO #%-8d", i);
strncpy(NewFH.sDACChannelName[i], szName, ABF_DACNAMELEN);
strncpy(NewFH.sDACChannelUnits[i], "mV ", ABF_ADCUNITLEN);
memcpy(NewFH.sDACChannelUnits[i], "mV ", ABF_ADCUNITLEN);
NewFH.fDACScaleFactor[i] = 20.0F;
}
......
......@@ -74,7 +74,7 @@ void WINAPI ABF2H_Initialize( ABF2FileHeader *pFH )
char szName[13];
sprintf(szName, "AI #%-8d", i);
strncpy(pFH->sADCChannelName[i], szName, ABF2_ADCNAMELEN);
strncpy(pFH->sADCUnits[i], "pA ", ABF2_ADCUNITLEN);
memcpy(pFH->sADCUnits[i], "pA ", ABF2_ADCUNITLEN);
pFH->nADCPtoLChannelMap[i] = short(i);
pFH->nADCSamplingSeq[i] = ABF2_UNUSED_CHANNEL;
......@@ -96,7 +96,7 @@ void WINAPI ABF2H_Initialize( ABF2FileHeader *pFH )
char szName[13];
sprintf(szName, "AO #%-8d", i);
strncpy(pFH->sDACChannelName[i], szName, ABF2_DACNAMELEN);
strncpy(pFH->sDACChannelUnits[i], "mV ", ABF2_ADCUNITLEN);
memcpy(pFH->sDACChannelUnits[i], "mV ", ABF2_ADCUNITLEN);
pFH->fDACScaleFactor[i] = 20.0F;
}
......
......@@ -1852,7 +1852,7 @@ void wxStfDoc::SelectTracesOfType(wxCommandEvent &WXUNUSED(event)) {
Vector_double input(EveryDialog.readInput());
if (input.size()!=1) return;
int selTyp=(int)input[0];
for (size_t n=0; n < (int)get()[GetCurChIndex()].size(); ++n) {
for (size_t n=0; n < get()[GetCurChIndex()].size(); ++n) {
if (GetSectionType(n)==selTyp) SelectTrace(n, baseBeg, baseEnd);
}
wxStfChildFrame* pFrame=(wxStfChildFrame*)GetDocumentWindow();
......@@ -2328,7 +2328,7 @@ void wxStfDoc::MarkEvents(wxCommandEvent& WXUNUSED(event)) {
}
baselineMean /= baseline;
double peakIndex=0;
int eventl = templateWave.size();
unsigned eventl = templateWave.size();
if (*cit + eventl >= cursec().get().size()) {
eventl = cursec().get().size()-1- (*cit);
}
......
......@@ -43,7 +43,7 @@
#pragma GCC diagnostic warning "-Wwrite-strings"
#endif
//#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/arrayobject.h>
#include "./app.h"
......@@ -738,7 +738,7 @@ bool wxStfDoc::LoadTDMS(const std::string& filename, Recording& ReturnData) {
if (nsections != 0) {
Channel ch(nsections);
for (int ns=0; ns<nsections; ++ns) {
PyObject* np_array = PyList_GetItem(section_list, ns);
PyArrayObject* np_array = (PyArrayObject*)PyList_GetItem(section_list, ns);
npy_intp* arr_shape = PyArray_DIMS(np_array);
int nsamples = arr_shape[0];
Section sec(nsamples);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment