aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-test-power.cpp
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-test-power.cpp
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-test-power.cpp')
-rw-r--r--utils/cec-compliance/cec-test-power.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/cec-compliance/cec-test-power.cpp b/utils/cec-compliance/cec-test-power.cpp
index 1f9c7e80..42099f01 100644
--- a/utils/cec-compliance/cec-test-power.cpp
+++ b/utils/cec-compliance/cec-test-power.cpp
@@ -267,7 +267,7 @@ static bool wait_changing_power_status(struct node *node, unsigned me, unsigned
__u8 old_status;
time_t t = time(NULL);
- announce("Checking for power status change. This may take up to %u s.", long_timeout);
+ announce("Checking for power status change. This may take up to %llu s.", (long long)long_timeout);
if (!get_power_status(node, me, la, old_status))
return false;
while (time(NULL) - t < long_timeout) {
@@ -297,7 +297,7 @@ static bool poll_stable_power_status(struct node *node, unsigned me, unsigned la
/* Some devices can use several seconds to transition from one power
state to another, so the power state must be repeatedly polled */
- announce("Waiting for new stable power status. This may take up to %u s.", long_timeout);
+ announce("Waiting for new stable power status. This may take up to %llu s.", (long long)long_timeout);
while (time(NULL) - t < long_timeout) {
__u8 power_status;

Privacy Policy