Skip to content

Default warnings-as-errors behavior breaks build on non-Windows platforms #28

@qwertychouskie

Description

@qwertychouskie

The warnings that become errors:

> Task :compileCANBridgeOsxuniversalReleaseSharedLibraryCANBridgeCpp
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/cpp/Drivers/Serial/SerialDriver.cpp:32:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDevice.h:34:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDeviceThread.h:48:
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:65:9: error: field 'm_threadIntervalMs' will be initialized after field 'm_counter' [-Werror,-Wreorder-ctor]
        m_threadIntervalMs(threadIntervalMs),
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        m_counter(counter)
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:80:46: error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
            if (element.m_msg.GetMessageId() == targetId) {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:88:174: error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'const int' [-Werror,-Wsign-compare]
        m_sendQueue.erase(std::remove_if(m_sendQueue.begin(), m_sendQueue.end(), [targetId](detail::CANThreadSendQueueElement element) { return element.m_msg.GetMessageId() == targetId; }), m_sendQueue.end());
                                                                                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:154:51: error: parameter 'details' set but not used [-Werror,-Wunused-but-set-parameter]
    void GetCANStatus(rev::usb::CANStatusDetails* details) {
                                                  ^
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/cpp/Drivers/Serial/SerialDriver.cpp:32:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDevice.h:34:
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDeviceThread.h:117:10: error: 'ReadMessages' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
    void ReadMessages(bool &reading)  {
         ^
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:199:18: note: overridden virtual function is here
    virtual void ReadMessages(bool &reading) = 0;
                 ^
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/cpp/Drivers/Serial/SerialDriver.cpp:32:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDevice.h:34:
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDeviceThread.h:184:10: error: 'WriteMessages' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
    bool WriteMessages(detail::CANThreadSendQueueElement el, std::chrono::steady_clock::time_point now) {
         ^
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:200:18: note: overridden virtual function is here
    virtual bool WriteMessages(detail::CANThreadSendQueueElement element, std::chrono::steady_clock::time_point now) = 0;
                 ^
6 errors generated.

In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/cpp/Drivers/Serial/SerialDevice.cpp:30:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDevice.h:34:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDeviceThread.h:48:
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:65:9: error: field 'm_threadIntervalMs' will be initialized after field 'm_counter' [-Werror,-Wreorder-ctor]
        m_threadIntervalMs(threadIntervalMs),
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        m_counter(counter)
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:80:46: error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
            if (element.m_msg.GetMessageId() == targetId) {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:88:174: error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'const int' [-Werror,-Wsign-compare]
        m_sendQueue.erase(std::remove_if(m_sendQueue.begin(), m_sendQueue.end(), [targetId](detail::CANThreadSendQueueElement element) { return element.m_msg.GetMessageId() == targetId; }), m_sendQueue.end());
                                                                                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:154:51: error: parameter 'details' set but not used [-Werror,-Wunused-but-set-parameter]
    void GetCANStatus(rev::usb::CANStatusDetails* details) {
                                                  ^
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/cpp/Drivers/Serial/SerialDevice.cpp:30:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDevice.h:34:
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDeviceThread.h:117:10: error: 'ReadMessages' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
    void ReadMessages(bool &reading)  {
         ^
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:199:18: note: overridden virtual function is here
    virtual void ReadMessages(bool &reading) = 0;
                 ^
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/cpp/Drivers/Serial/SerialDevice.cpp:30:
In file included from /Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDevice.h:34:
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/SerialPort/SerialDeviceThread.h:184:10: error: 'WriteMessages' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
    bool WriteMessages(detail::CANThreadSendQueueElement el, std::chrono::steady_clock::time_point now) {
         ^
/Users/[user]/unofficial-rev-port/CANBridge/src/main/native/include/rev/Drivers/DriverDeviceThread.h:200:18: note: overridden virtual function is here
    virtual bool WriteMessages(detail::CANThreadSendQueueElement element, std::chrono::steady_clock::time_point now) = 0;
                 ^
6 errors generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions