Transceiver52M: Enable all warnings and resolve

Mainly basic signed vs unsigned comparisons and intializer ordering.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
Thomas Tsou
2013-11-15 16:32:54 -05:00
parent 8c33679fa5
commit 3f32ab5afa
8 changed files with 17 additions and 17 deletions

View File

@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common include $(top_srcdir)/Makefile.common
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) -I./common AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES) -I./common
AM_CXXFLAGS = -ldl -lpthread AM_CXXFLAGS = -ldl -lpthread
SUBDIRS = arm x86 SUBDIRS = arm x86

View File

@@ -654,7 +654,7 @@ void Transceiver::driveControl(size_t chan)
} }
else if (!strcmp(command,"SETTSC")) { else if (!strcmp(command,"SETTSC")) {
// set TSC // set TSC
int TSC; unsigned TSC;
sscanf(buffer, "%3s %s %d", cmdcheck, command, &TSC); sscanf(buffer, "%3s %s %d", cmdcheck, command, &TSC);
if (mOn) if (mOn)
sprintf(response, "RSP SETTSC 1 %d", TSC); sprintf(response, "RSP SETTSC 1 %d", TSC);

View File

@@ -352,6 +352,8 @@ void *async_event_loop(uhd_device *dev)
dev->recv_async_msg(); dev->recv_async_msg();
pthread_testcancel(); pthread_testcancel();
} }
return NULL;
} }
/* /*

View File

@@ -149,7 +149,7 @@ int RadioInterface::unRadioifyVector(float *floatVector,
return -1; return -1;
} }
for (int i = 0; i < newVector.size(); i++) { for (size_t i = 0; i < newVector.size(); i++) {
*itr++ = Complex<float>(floatVector[2 * i + 0], *itr++ = Complex<float>(floatVector[2 * i + 0],
floatVector[2 * i + 1]); floatVector[2 * i + 1]);
} }

View File

@@ -83,7 +83,7 @@ float noiseVector::avg() const
{ {
float val = 0.0; float val = 0.0;
for (int i = 0; i < size(); i++) for (size_t i = 0; i < size(); i++)
val += (*this)[i]; val += (*this)[i];
return val / (float) size(); return val / (float) size();

View File

@@ -366,10 +366,11 @@ static void GMSKReverseRotate(signalVector &x, int sps)
signalVector *convolve(const signalVector *x, signalVector *convolve(const signalVector *x,
const signalVector *h, const signalVector *h,
signalVector *y, signalVector *y,
ConvType spanType, int start, ConvType spanType, size_t start,
unsigned len, unsigned step, int offset) size_t len, size_t step, int offset)
{ {
int rc, head = 0, tail = 0; int rc;
size_t head = 0, tail = 0;
bool alloc = false, append = false; bool alloc = false, append = false;
const signalVector *_x = NULL; const signalVector *_x = NULL;
@@ -1000,7 +1001,7 @@ static complex fastPeakDetect(const signalVector &rxBurst, float *index)
complex amp; complex amp;
int _index = -1; int _index = -1;
for (int i = 0; i < rxBurst.size(); i++) { for (size_t i = 0; i < rxBurst.size(); i++) {
val = rxBurst[i].norm2(); val = rxBurst[i].norm2();
if (val > max) { if (val > max) {
max = val; max = val;
@@ -1563,7 +1564,7 @@ bool designDFE(signalVector &channelResponse,
signalVector *L[Nf]; signalVector *L[Nf];
signalVector::iterator Lptr; signalVector::iterator Lptr;
float d; float d = 1.0;
for(int i = 0; i < Nf; i++) { for(int i = 0; i < Nf; i++) {
d = G0.begin()->norm2() + G1.begin()->norm2(); d = G0.begin()->norm2() + G1.begin()->norm2();
L[i] = new signalVector(Nf+nu); L[i] = new signalVector(Nf+nu);

View File

@@ -53,13 +53,10 @@ void sigProcLibDestroy(void);
@param spanType The type/span of the convolution. @param spanType The type/span of the convolution.
@return The convolution result or NULL on error. @return The convolution result or NULL on error.
*/ */
signalVector *convolve(const signalVector *a, signalVector *convolve(const signalVector *a, const signalVector *b,
const signalVector *b, signalVector *c, ConvType spanType,
signalVector *c, size_t start = 0, size_t len = 0,
ConvType spanType, size_t step = 1, int offset = 0);
int start = 0,
unsigned len = 0,
unsigned step = 1, int offset = 0);
/** /**
Frequency shift a vector. Frequency shift a vector.

View File

@@ -43,9 +43,9 @@ public:
void setAligned(bool aligned); void setAligned(bool aligned);
private: private:
Symmetry symmetry;
bool real; bool real;
bool aligned; bool aligned;
Symmetry symmetry;
}; };
#endif /* _SIGNALVECTOR_H_ */ #endif /* _SIGNALVECTOR_H_ */