mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
cmake: disable some other warnings seen with edison gcc 4.9.1
Also, fix possible uninitialized access in ds1808lc C++ example. Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
72e8629d72
commit
7bc9ef0150
@ -92,7 +92,7 @@ endfunction ()
|
|||||||
# Compiler flags common to both C and CXX
|
# Compiler flags common to both C and CXX
|
||||||
# Enable -Wall
|
# Enable -Wall
|
||||||
# GCC-6 added -Wmisleading-indentation to -Wall, skip these for now
|
# GCC-6 added -Wmisleading-indentation to -Wall, skip these for now
|
||||||
set (C_CXX_WARNING_FLAGS -Wall -Wno-misleading-indentation)
|
set (C_CXX_WARNING_FLAGS -Wall -Wno-misleading-indentation -Wno-strict-aliasing)
|
||||||
|
|
||||||
# Warnings as errors?
|
# Warnings as errors?
|
||||||
if (WERROR)
|
if (WERROR)
|
||||||
|
@ -20,13 +20,13 @@ void printState(upm::ILightController *lightController)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main( int argc, char **argv )
|
int main( int argc, char **argv )
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
upm::ILightController* lightController;
|
upm::ILightController* lightController = nullptr;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
lightController = new upm::DS1808LC(DS1808_GPIO_PWR, EDISON_I2C_BUS);
|
lightController = new upm::DS1808LC(DS1808_GPIO_PWR, EDISON_I2C_BUS);
|
||||||
std::cout << "Existing state: "; printState(lightController);
|
std::cout << "Existing state: "; printState(lightController);
|
||||||
if (argc == 2)
|
if (argc == 2)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
# Selectively disable certain CXX warnings for SWIG wrappers
|
# Selectively disable certain CXX warnings for SWIG wrappers
|
||||||
# SWIG wrappers emit -Wdelete-non-virtual-dtor and -Wunused-function warnings
|
# SWIG wrappers emit -Wdelete-non-virtual-dtor and -Wunused-function warnings
|
||||||
set (SWIG_CXX_DISABLE_WARNINGS -Wno-delete-non-virtual-dtor
|
set (SWIG_CXX_DISABLE_WARNINGS -Wno-delete-non-virtual-dtor
|
||||||
-Wno-unused-function)
|
-Wno-unused-function
|
||||||
|
-Wno-maybe-uninitialized
|
||||||
|
-Wno-strict-aliasing)
|
||||||
|
|
||||||
macro (file_to_list readfile outlist)
|
macro (file_to_list readfile outlist)
|
||||||
FILE(READ "${readfile}" contents)
|
FILE(READ "${readfile}" contents)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user