diff --git a/libs/main/core/pibase.h b/libs/main/core/pibase.h index 5531fd43..0a44cf74 100644 --- a/libs/main/core/pibase.h +++ b/libs/main/core/pibase.h @@ -246,6 +246,10 @@ extern char ** environ; #endif +#ifndef NO_UNUSED +# define NO_UNUSED(x) (void)x +#endif + #ifndef assert # define assert(x) # define assertm(exp, msg) diff --git a/libs/main/core/pibytearray.h b/libs/main/core/pibytearray.h index 1c4a8a22..da738b30 100644 --- a/libs/main/core/pibytearray.h +++ b/libs/main/core/pibytearray.h @@ -272,8 +272,8 @@ inline PIByteArray::StreamRef operator <<(PIByteArray & s, const T & v) { PIP_EXPORT PIByteArray & operator <<(PIByteArray & s, const PIByteArray & v); //! \relatesalso PIByteArray -//! \~english Store operator, see \ref PIByteArray_sec1 for details -//! \~russian Оператор сохранения, подробнее в \ref PIByteArray_sec1 +//! \~english Store operator +//! \~russian Оператор сохранения inline PIByteArray & operator <<(PIByteArray & s, const PIByteArray::RawData & v) { int os = s.size_s(); if (v.s > 0) { @@ -406,8 +406,8 @@ inline PIByteArray::StreamRef operator >>(PIByteArray & s, T & v) { PIP_EXPORT PIByteArray & operator >>(PIByteArray & s, PIByteArray & v); //! \relatesalso PIByteArray -//! \~english Restore operator, see \ref PIByteArray_sec1 for details -//! \~russian Оператор извлечения, подробнее в \ref PIByteArray_sec1 +//! \~english Restore operator +//! \~russian Оператор извлечения inline PIByteArray & operator >>(PIByteArray & s, PIByteArray::RawData v) { if (s.size_s() < v.s) { printf("error with RawData %d < %d\n", (int)s.size_s(), v.s); diff --git a/libs/main/io_devices/pigpio.cpp b/libs/main/io_devices/pigpio.cpp index 1e678f90..722ce17d 100644 --- a/libs/main/io_devices/pigpio.cpp +++ b/libs/main/io_devices/pigpio.cpp @@ -220,6 +220,7 @@ void PIGPIO::initPin(int gpio_num, Direction dir) { } g.dir = dir; int ret = 0; + NO_UNUSED(ret); switch(dir) { case In: ret = system(("echo in >> /sys/class/gpio/" + g.name + "/direction").dataAscii()); @@ -239,6 +240,7 @@ void PIGPIO::pinSet(int gpio_num, bool value) { PIMutexLocker ml(mutex); GPIOData & g(gpio_[gpio_num]); int ret = 0; + NO_UNUSED(ret); if (g.fd != -1) { if (value) ret = ::write(g.fd, "1", 1); else ret = ::write(g.fd, "0", 1);