diff --git a/knx-linux/CMakeLists.txt b/knx-linux/CMakeLists.txt index 2c2b136..0f3caec 100644 --- a/knx-linux/CMakeLists.txt +++ b/knx-linux/CMakeLists.txt @@ -6,5 +6,6 @@ project(knx-linux) set(LIBRARIES_FROM_REFERENCES "") add_executable(knx-linux ../src/knx/address_table_object.cpp ../src/knx/apdu.cpp ../src/knx/application_layer.cpp ../src/knx/application_program_object.cpp ../src/knx/association_table_object.cpp ../src/knx/bau.cpp ../src/knx/bau07B0.cpp ../src/knx/bau57B0.cpp ../src/knx/bau_systemB.cpp ../src/knx/bits.cpp ../src/knx/cemi_frame.cpp ../src/knx/data_link_layer.cpp ../src/knx/datapoint_types.cpp ../src/knx/device_object.cpp ../src/knx/group_object.cpp ../src/knx/group_object_table_object.cpp ../src/knx/interface_object.cpp ../src/knx/ip_data_link_layer.cpp ../src/knx/ip_parameter_object.cpp ../src/knx/memory.cpp ../src/knx/network_layer.cpp ../src/knx/npdu.cpp ../src/knx/table_object.cpp ../src/knx/tpdu.cpp ../src/knx/tpuart_data_link_layer.cpp ../src/knx/transport_layer.cpp ../src/knx/platform.cpp main.cpp ../src/linux_platform.cpp) target_link_libraries(knx-linux "${LIBRARIES_FROM_REFERENCES}") +include_directories(../src) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -Wno-switch -g -O0") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-unknown-pragmas -Wno-switch -g -O0") diff --git a/src/knx/bits.cpp b/src/knx/bits.cpp index 5762b24..2a913f0 100644 --- a/src/knx/bits.cpp +++ b/src/knx/bits.cpp @@ -10,7 +10,7 @@ uint8_t* popByte(uint8_t& b, uint8_t* data) void printHex(const char* suffix, const uint8_t *data, size_t length) { print(suffix); - for (int i = 0; i < length; i++) { + for (uint i = 0; i < length; i++) { if (data[i] < 0x10) { print("0"); } print(data[i], HEX); print(" "); diff --git a/src/knx/table_object.cpp b/src/knx/table_object.cpp index f561985..e14571f 100644 --- a/src/knx/table_object.cpp +++ b/src/knx/table_object.cpp @@ -8,7 +8,7 @@ TableObject::TableObject(Platform& platform): _platform(platform) } -void TableObject::readProperty(PropertyID id, uint32_t start, uint32_t count, uint8_t* data) +void TableObject::readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data) { switch (id) { diff --git a/src/knx/table_object.h b/src/knx/table_object.h index 76bb526..5384e4e 100644 --- a/src/knx/table_object.h +++ b/src/knx/table_object.h @@ -7,7 +7,7 @@ class TableObject: public InterfaceObject { public: TableObject(Platform& platform); - virtual void readProperty(PropertyID id, uint32_t start, uint32_t count, uint8_t* data); + virtual void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data); virtual void writeProperty(PropertyID id, uint8_t start, uint8_t* data, uint8_t count); virtual uint8_t propertySize(PropertyID id); virtual ~TableObject();