Werror: Enable warnings as errors

Added C/CXX warning messages similar to MRAA (w/ -Werror).

    * Added syslog warning for missing switch cases
    * Cleaned up uint vs int usage
    * Fixed redifinition errors for C structs
    * Added virtual destructors for base classes
    * Removed redundant CMAKE_CXX_FLAGS from COMPILE_FLAGS for all three
      wrapper languages.  The CMAKE_CXX_FLAGS were showing up twice in
      the compile commands for the wrappers.
    * Added CMake WERROR option to enable/disable warnings as errors for
      all targets.
    * Disable a handful of compiler warnings for the wrapper cxx files,
      this minimizes the number of warnings from auto-generated code).

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-10-13 12:18:52 -07:00
parent 58dfa9d95a
commit 6be7012987
26 changed files with 185 additions and 40 deletions

View File

@ -43,7 +43,7 @@ sig_handler(int signo)
void
handler (clbk_data data) {
printf ("callback data (%d)\n", data);
printf ("callback data (%d)\n", data.is_heart_beat);
}
int
@ -51,7 +51,7 @@ main(int argc, char **argv)
{
//! [Interesting]
Pulsensor *sensor = new Pulsensor(handler);
sensor->start_sampler();
while (!doWork) {
usleep (5);