From 3a0aa4ce466146296f870858e9a99e6b3c7ffb93 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Thu, 5 Feb 2015 02:41:46 +0300 Subject: [PATCH] Coverity CID 1268180 --- libuavcan/include/uavcan/util/templates.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libuavcan/include/uavcan/util/templates.hpp b/libuavcan/include/uavcan/util/templates.hpp index 8c3b3028b2..8e2db29b7e 100644 --- a/libuavcan/include/uavcan/util/templates.hpp +++ b/libuavcan/include/uavcan/util/templates.hpp @@ -479,6 +479,7 @@ inline bool getSignBit(T arg) #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11 return std::signbit(arg); #else + // coverity[divide_by_zero : FALSE] return arg < T(0) || (((arg <= T(0)) && (arg >= T(0))) && (T(1) / arg < T(0))); #endif }