Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance/remove warnings compilation #261

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down
8 changes: 5 additions & 3 deletions src/DUNE/Hardware/SocketCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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());
Expand Down
4 changes: 3 additions & 1 deletion vendor/libraries/jpeg/jcmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion vendor/libraries/jpeg/jdarith.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--)
Expand Down
2 changes: 1 addition & 1 deletion vendor/libraries/jpeg/jdhuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
Loading