Skip to content
Snippets Groups Projects
Commit 60038ac8 authored by Armin Co's avatar Armin Co
Browse files

Show all Warnings

parent b0cb49e6
Branches
Tags
No related merge requests found
...@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.6) ...@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.6)
project(SmartGridModell) project(SmartGridModell)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
add_compile_options(-Wall -Wextra -pedantic)
# Add spdlog for nice and easy logging # Add spdlog for nice and easy logging
add_subdirectory(libs/spdlog) add_subdirectory(libs/spdlog)
......
...@@ -41,9 +41,9 @@ bool Node::open_device(const char* i2c_device_name) ...@@ -41,9 +41,9 @@ bool Node::open_device(const char* i2c_device_name)
bool Node::send(uint8_t* data, size_t size) bool Node::send(uint8_t* data, ssize_t size)
{ {
auto bytes_written = write(m_device, data, size); ssize_t bytes_written = write(m_device, data, size);
if (bytes_written != size) if (bytes_written != size)
{ {
spdlog::error("Error while writing bytes. Written {} bytes instead of {}!", bytes_written, size); spdlog::error("Error while writing bytes. Written {} bytes instead of {}!", bytes_written, size);
......
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
/// @param data Data that should be written /// @param data Data that should be written
/// @return If write operation was successfull /// @return If write operation was successfull
// //
bool send(uint8_t* data, size_t size); bool send(uint8_t* data, ssize_t size);
bool send(std::vector<uint8_t> & data); bool send(std::vector<uint8_t> & data);
bool send(std::array<uint8_t, 2> &data); bool send(std::array<uint8_t, 2> &data);
bool send(uint8_t reg, uint8_t val); bool send(uint8_t reg, uint8_t val);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment