mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
bitbake: Fix for pthreads C test w/yocto
Fixed a problem where the C/CXX compile flags were getting overwritten. Fixed warnings in a few sensor drivers. This commit fixes #485 Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
54771e63c1
commit
cdc33ceb9f
@ -71,6 +71,7 @@ include (CheckCXXCompilerFlag)
|
|||||||
# This function checks to see if each flag is supported
|
# This function checks to see if each flag is supported
|
||||||
# by the compiler before setting the compile option.
|
# by the compiler before setting the compile option.
|
||||||
function (upm_add_compile_flags compiler)
|
function (upm_add_compile_flags compiler)
|
||||||
|
set (_TMP_COMPILER_FLAGS "")
|
||||||
# Iterate the flags, check if supported
|
# Iterate the flags, check if supported
|
||||||
foreach (flag ${ARGN})
|
foreach (flag ${ARGN})
|
||||||
# Check if this compile flag is supported
|
# Check if this compile flag is supported
|
||||||
@ -85,7 +86,7 @@ function (upm_add_compile_flags compiler)
|
|||||||
endforeach (flag ${ARGN})
|
endforeach (flag ${ARGN})
|
||||||
|
|
||||||
# Set the variable in the parent scope
|
# Set the variable in the parent scope
|
||||||
set (CMAKE_${compiler}_FLAGS ${_TMP_COMPILER_FLAGS} PARENT_SCOPE)
|
set (CMAKE_${compiler}_FLAGS "${CMAKE_${compiler}_FLAGS} ${_TMP_COMPILER_FLAGS}" PARENT_SCOPE)
|
||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
# Compiler flags common to both C and CXX
|
# Compiler flags common to both C and CXX
|
||||||
@ -95,7 +96,7 @@ set (C_CXX_WARNING_FLAGS -Wall -Wno-misleading-indentation)
|
|||||||
|
|
||||||
# Warnings as errors?
|
# Warnings as errors?
|
||||||
if (WERROR)
|
if (WERROR)
|
||||||
list (APPEND C_CXX_WARNING_FLAGS -Werror)
|
set (C_CXX_WARNING_FLAGS "-Werror ${C_CXX_WARNING_FLAGS}")
|
||||||
message (STATUS "Warnings as errors enabled (-Werror), disable with -DWERROR=off")
|
message (STATUS "Warnings as errors enabled (-Werror), disable with -DWERROR=off")
|
||||||
endif (WERROR)
|
endif (WERROR)
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ HTU21D::testSensor(void)
|
|||||||
int iError = 0;
|
int iError = 0;
|
||||||
float fTemp, fHum;
|
float fTemp, fHum;
|
||||||
float fTempMax, fTempMin;
|
float fTempMax, fTempMin;
|
||||||
float fHumMax, fHumMin;
|
float fHumMax = 0.0, fHumMin = 0.0;
|
||||||
float fTempFirst;
|
float fTempFirst;
|
||||||
|
|
||||||
fprintf(stdout, "Executing Sensor Test\n" );
|
fprintf(stdout, "Executing Sensor Test\n" );
|
||||||
|
@ -145,7 +145,7 @@ mraa::Result T6713::runCommand(MODBUS_COMMANDS cmd)
|
|||||||
{
|
{
|
||||||
|
|
||||||
COMMAND * cmdPacket = new COMMAND ;
|
COMMAND * cmdPacket = new COMMAND ;
|
||||||
mraa::Result ret;
|
mraa::Result ret = mraa::SUCCESS;
|
||||||
|
|
||||||
switch(cmd)
|
switch(cmd)
|
||||||
{
|
{
|
||||||
|
@ -493,7 +493,7 @@ uint8_t WT5001::getPlayState()
|
|||||||
bool WT5001::getNumFiles(WT5001_PLAYSOURCE_T psrc, uint16_t *numf)
|
bool WT5001::getNumFiles(WT5001_PLAYSOURCE_T psrc, uint16_t *numf)
|
||||||
{
|
{
|
||||||
char pkt[4];
|
char pkt[4];
|
||||||
WT5001_OPCODE_T opcode;
|
WT5001_OPCODE_T opcode = NONE;
|
||||||
|
|
||||||
pkt[0] = WT5001_START;
|
pkt[0] = WT5001_START;
|
||||||
pkt[1] = 0x02; // length
|
pkt[1] = 0x02; // length
|
||||||
|
Loading…
x
Reference in New Issue
Block a user