Resolve -Wreorder warnings.

Rearrange member initialization in constructors to silence GCC
-Wreorder warnings (-Wreorder is enabled by -Wall).

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Add some missing end-of-file newlines.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Fix up unused variable/value warnings.

Generic changes:

- Genuinely unused variables (-Wunused-variable): delete
  them. Sometimes add a comment if the variable is for an extension of
  the code that isn't done yet.

- Variables that became unused due to commented-out
  code (-Wunused-variable): comment out their definitions. Dirty, but
  that's because commenting out code instead of deleting it is
  dirty.

  Many of these are due to commented-out printlines that should have
  been log messages that only get emitted at high verbosity level.

Specific changes:

- SpikeObject.cpp (-Wunused-value): move initialization of loop
  variable into first for loop clause to silence the warning.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Dsp: fix undefined behavior.

These patches have been submitted upstream:

https://github.com/vinniefalco/DSPFilters/pull/10

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Dsp: fix unused variable warnings.

These patches have been submitted upstream:

https://github.com/vinniefalco/DSPFilters/pull/11

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
ArduinoOutput.cpp: Add FIXME for hard-coded serial port path

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
ArduinoOutput.cpp: Fix enable() and disable().

Fixes caught by -Wreturn-type.

Have enable() properly return a value. Have disable() actually disable
the Arduino, and then properly return a value.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SpikeDetector.h: make dataBuffer private.

If it's for internal use only, then enforce that.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SpikeDetector: give setChannel() and setElectrodeName() void return type.

It looks like declaring them to return bool was a mistake:

1. None of their callers check their return value.

2. They don't return a value, and it doesn't look like there's any
   reason for them to.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
GenericProcessor: don't return a reference to a stack variable.

That's not gonna work. Since nullParam is just a "nothing found", put
it in static storage and return that.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
GenericProcessor: fix missing return values.

getInputChannelName() and getOutputChannelName() (pure virtual in the
superclass) aren't returning anything. So far this hasn't triggered
any memory errors because nobody's calling them.

To hack around this, have both of these return
"xxx-UNUSED-OPEN-EPHYS-xxx" (none of the existing subclases override
these methods, so leaving them pure virtual isn't workable). This way,
if we ever start calling these, we'll notice right away that a fix is
needed (instead of segfaulting, etc.).

Also keep them virtual to allow overrides.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Add some missing return values.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
IntanThread.cpp: fix type mismatch.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Delete NetworkThread.

It's unused, declared obsolete, and is triggering GCC warnings. If
anyone wants it back, it'll be in the Git history.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Merge pull request #24 from mbolivar/build-with-Wall-fixes

Cleanups and bugfixes caught by building with -Wall