From: Lars Op den Kamp Date: Sun, 7 Oct 2012 22:13:48 +0000 (+0200) Subject: silence signed overflow warning X-Git-Tag: upstream/2.2.0~1^2~17^2^2~11 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4a69e83cb270fde99b0991e8c8443d09cc61b102;p=deb_libcec.git silence signed overflow warning --- diff --git a/src/lib/CECClient.cpp b/src/lib/CECClient.cpp index cafcd70..ed3f47e 100644 --- a/src/lib/CECClient.cpp +++ b/src/lib/CECClient.cpp @@ -1076,7 +1076,7 @@ std::string CCECClient::GetConnectionInfo(void) { time_t buildTime = (time_t)m_configuration.iFirmwareBuildDate; strLog.AppendFormat(", firmware build date: %s", asctime(gmtime(&buildTime))); - strLog = strLog.Left((int)strLog.length() - 1); // strip \n added by asctime + strLog = strLog.substr(0, strLog.length() > 0 ? (size_t)(strLog.length() - 1) : 0); // strip \n added by asctime strLog.append(" +0000"); }