aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-compliance.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2018-01-11 09:33:34 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-01-11 09:43:02 -0200
commit7cfcb7e384fe433b33f30bd9e058c7aadec8e93c (patch)
treefb0a1d6df03bcc5fb9815a2c572617dbd637717e /utils/cec-compliance/cec-compliance.h
parent844d315840f9f4a3110d8a4b1807c2aa396db364 (diff)
cec: fix warnings when building on arm 32 bits
time() returns time_t, whose definition is arch-dependent. This fixes the following warnings: cec-test-power.cpp: In function ‘bool wait_changing_power_status(node*, unsigned int, unsigned int, __u8&, unsigned int&)’: cec-test-power.cpp:273:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (time(NULL) - t < long_timeout) { ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ cec-test-power.cpp: In function ‘bool poll_stable_power_status(node*, unsigned int, unsigned int, __u8, unsigned int&)’: cec-test-power.cpp:301:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (time(NULL) - t < long_timeout) { ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'utils/cec-compliance/cec-compliance.h')
-rw-r--r--utils/cec-compliance/cec-compliance.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 4775908d..82b0c94b 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -23,6 +23,7 @@
#include <stdarg.h>
#include <cerrno>
#include <string>
+#include <time.h>
#include <linux/cec-funcs.h>
#include "cec-htng-funcs.h"
@@ -125,7 +126,7 @@ extern bool show_info;
extern bool show_warnings;
extern unsigned warnings;
extern unsigned reply_threshold;
-extern unsigned long_timeout;
+extern time_t long_timeout;
struct remote {
bool recognized_op[256];

Privacy Policy