Skip to content

Commit

Permalink
Fixed warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
cilibrar committed Aug 21, 2004
1 parent 8670445 commit f44ec6e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AM_CPPFLAGS= -I.
bin_PROGRAMS = nsd modeegdriver readedf writeedf opencnvdriver writebdf

nsd_SOURCES = nsd.c nsutil.c nsnet.c monitor.c monitor.h cmdhandler.c \
openedf.c config.h cmdhandler.h edfmacros.h nsd.h nsnet.h nsutil.h openedf.h pctimer.h
openedf.c config.h cmdhandler.h edfmacros.h nsd.h nsnet.h nsutil.h openedf.h pctimer.h stringtable.c stringtable.h

modeegdriver_SOURCES = modeegdriver.c nsser.c nsutil.c openedf.c \
nsnet.c monitor.c monitor.h \
Expand Down
14 changes: 7 additions & 7 deletions src/opencnvdriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static struct EDFDecodedConfig current;
*/
int isValidPacket(unsigned short chan, long *samples)
{
int i;
// int i;
// if (chan != 2 && chan != 4 && chan !=5 && chan != 6) return 0;
// for (i = 0; i < chan; i++) {
// if (samples[i] > 16777216) return 0;
Expand All @@ -151,7 +151,7 @@ void eatCharacter(unsigned char c)
/// place to store eeg data
long vals[MAXCHANNELS];
int didMatch = 0;
int ns=3;
//int ns=3;
/// has the protocol been detected and validated ?
if (hasMatchedProtocol) {
didMatch = doesMatchOpenCNV(c, vals);
Expand Down Expand Up @@ -211,7 +211,7 @@ void handleSamples(int packetCounter, int chan, long *vals)
{
char buf[MAXLEN]; ///< network socket buffer
int bufPos = 0;
long ChannelValue;
//long ChannelValue;
int i;
#ifdef DEBUGGING
printf("Got good packet with counter %d, %d chan\n", packetCounter, chan);
Expand Down Expand Up @@ -354,9 +354,9 @@ int main(int argc, char **argv)

char linebuf[MAXLEN+1]; // fifo command buffer
int writepos = 0;
int readpos = 0;
//int readpos = 0;
int len;
unsigned int lpos = 0;
//unsigned int lpos = 0;

rprintf("OpenCNV Driver v. %s-%s\n", VERSION, OSTYPESTR);

Expand Down Expand Up @@ -400,8 +400,8 @@ int main(int argc, char **argv)
///
current=openCNVCfg;
setEDFHeaderBytes(&current);
strcpy(current.hdr.recordingStartDate, getDMY());
strcpy(current.hdr.recordingStartTime, getHMS());
strcpy(current.hdr.recordingStartDate, getDMY());
strcpy(current.hdr.recordingStartTime, getHMS());
// assert(isValidREDF(result));
// makeREDFConfig(&current, &openCNVCfg);
// write configuration into string
Expand Down
2 changes: 1 addition & 1 deletion src/openedf.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ const char *getHMS(void)

int makeREDFConfig(struct EDFDecodedConfig *result, const struct EDFDecodedConfig *source)
{
int newSamples, i;
//int newSamples, i;
*result = *source;
/*
if (source->hdr.dataRecordSeconds != 1.0) {
Expand Down
3 changes: 3 additions & 0 deletions src/openedf.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,8 @@ int makeREDFConfig(struct EDFDecodedConfig *result, const struct EDFDecodedConfi
/* Returns a text description of the last error */
const char *getLastError(void);

const char *getDMY(void);
const char *getHMS(void);

#endif

8 changes: 4 additions & 4 deletions src/writebdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ void writeBufferToFile()
void handleSamples(int packetCounter, int channels)
{
static int lastPacketCounter = 0;
int i,j;
unsigned char c1,c2,c3;
int i;
unsigned char c1,c2,c3=0;
if (lastPacketCounter + 1 != packetCounter && packetCounter != 0 && lastPacketCounter != 0) {
rprintf("May have missed packet: got packetCounters %d and %d\n", lastPacketCounter, packetCounter);
}
Expand Down Expand Up @@ -224,7 +224,7 @@ int main(int argc, char **argv)
fd_set toread;
int linePos = 0;
int i;
double tStart,tEnde;
double tStart;
sock_t sock_fd;
int retval;

Expand Down Expand Up @@ -338,7 +338,7 @@ int main(int argc, char **argv)
while ( (tStart+opts.seconds) > pctimer() ) {
char *cur;
int curParam = 0;
int devNum, packetCounter=0, channels=0;
int packetCounter=0, channels=0;
rselect(sock_fd+1, &toread, NULL, NULL);
linePos = readline(sock_fd, lineBuf, sizeof(EDFPacket), &ib);
if (isEOF(sock_fd, &ib)) {
Expand Down

0 comments on commit f44ec6e

Please sign in to comment.