diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cb88b284f..bbca0f1150 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,6 +180,19 @@ install(FILES ${DUNE_GENERATED}/src/DUNE/Config.hpp include(${PROJECT_SOURCE_DIR}/cmake/Version.cmake) + +message(STATUS "") +message(STATUS "******************************************") +message(STATUS "*** Compiler Flags ***") +message(STATUS "******************************************") + +message(STATUS "Adding: -Wno-cpp") +set(DUNE_CXX_FLAGS "${DUNE_CXX_FLAGS} -Wno-cpp") +set(DUNE_C_FLAGS "${DUNE_C_FLAGS} -Wno-cpp") + +message(STATUS "DUNE_CXX_FLAGS: ${DUNE_CXX_FLAGS}") +message(STATUS "DUNE_C_FLAGS: ${DUNE_C_FLAGS}") + set_source_files_properties(${DUNE_CORE_SOURCES} ${USER_CORE_SOURCES} PROPERTIES COMPILE_FLAGS "${DUNE_CXX_FLAGS} ${DUNE_CXX_FLAGS_STRICT}") diff --git a/src/DUNE/Hardware/SocketCAN.cpp b/src/DUNE/Hardware/SocketCAN.cpp index 897f31c3ac..786f450dc3 100644 --- a/src/DUNE/Hardware/SocketCAN.cpp +++ b/src/DUNE/Hardware/SocketCAN.cpp @@ -85,7 +85,7 @@ namespace DUNE throw Error("Frame type not recognized", System::Error::getLastMessage()); } - std::strncpy(m_ifr.ifr_name, can_dev.c_str(), IFNAMSIZ); + std::strncpy(m_ifr.ifr_name, can_dev.c_str(), IFNAMSIZ - 1); if(::ioctl(m_can_socket, SIOCGIFFLAGS, &m_ifr) < 0) { @@ -178,14 +178,16 @@ namespace DUNE frame.can_dlc = size; frame.can_id = cantxid; memcpy(frame.data, bfr, size); - ::write(m_can_socket, &frame, CAN_MTU); + if (::write(m_can_socket, &frame, CAN_MTU) == -1) + throw Error("Write failed", System::Error::getLastMessage()); break; case CAN_FD: struct canfd_frame fdframe; fdframe.len = size; fdframe.can_id = cantxid; memcpy(fdframe.data, bfr, size); - ::write(m_can_socket, &fdframe, CANFD_MTU); + if (::write(m_can_socket, &fdframe, CANFD_MTU) == -1) + throw Error("Write failed", System::Error::getLastMessage()); break; default: throw Error("Frame type not recognized", System::Error::getLastMessage()); diff --git a/vendor/libraries/jpeg/jcmaster.c b/vendor/libraries/jpeg/jcmaster.c index 660883f459..6d1497391b 100644 --- a/vendor/libraries/jpeg/jcmaster.c +++ b/vendor/libraries/jpeg/jcmaster.c @@ -674,6 +674,9 @@ prepare_for_pass (j_compress_ptr cinfo) break; #ifdef ENTROPY_OPT_SUPPORTED case huff_opt_pass: +#endif + case output_pass: +#ifdef ENTROPY_OPT_SUPPORTED /* Do Huffman optimization for a scan after the first one. */ select_scan_parameters(cinfo); per_scan_setup(cinfo); @@ -690,7 +693,6 @@ prepare_for_pass (j_compress_ptr cinfo) master->pass_number++; /*FALLTHROUGH*/ #endif - case output_pass: /* Do a data-output pass. */ /* We need not repeat per-scan setup if prior optimization pass did it. */ if (! cinfo->optimize_coding) { diff --git a/vendor/libraries/jpeg/jdarith.c b/vendor/libraries/jpeg/jdarith.c index c858b248b6..6aaec225fa 100644 --- a/vendor/libraries/jpeg/jdarith.c +++ b/vendor/libraries/jpeg/jdarith.c @@ -454,7 +454,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) tbl = cinfo->cur_comp_info[0]->ac_tbl_no; p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ + m1 = ((unsigned int) -1) << cinfo->Al; /* -1 in the bit position being coded */ /* Establish EOBx (previous stage end-of-block) index */ for (kex = cinfo->Se; kex > 0; kex--) diff --git a/vendor/libraries/jpeg/jdhuff.c b/vendor/libraries/jpeg/jdhuff.c index 06f92fe47f..68693cab69 100644 --- a/vendor/libraries/jpeg/jdhuff.c +++ b/vendor/libraries/jpeg/jdhuff.c @@ -928,7 +928,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) Se = cinfo->Se; p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ + m1 = ((unsigned int) -1) << cinfo->Al; /* -1 in the bit position being coded */ natural_order = cinfo->natural_order; /* Load up working state */