From 9d5c9e04aac3689f49098cba0e630128c0ef4caa Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 12 Mar 2016 17:30:58 +0100 Subject: [PATCH] onewire plugin: fix two compiler warnings onewire.c:418:31: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if ((status > 0) && (status < sizeof (subpath))) ~~~~~~ ^ ~~~~~~~~~~~~~~~~ onewire.c:422:31: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] if ((status > 0) && (status < sizeof (subpath))) ~~~~~~ ^ ~~~~~~~~~~~~~~~~ --- src/onewire.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onewire.c b/src/onewire.c index 58c35e1e..3c3afdf6 100644 --- a/src/onewire.c +++ b/src/onewire.c @@ -415,11 +415,11 @@ static int cow_read_ds2409 (const char *path) int status; status = ssnprintf (subpath, sizeof (subpath), "%s/main", path); - if ((status > 0) && (status < sizeof (subpath))) + if ((status > 0) && (status < (int) sizeof (subpath))) cow_read_bus (subpath); status = ssnprintf (subpath, sizeof (subpath), "%s/aux", path); - if ((status > 0) && (status < sizeof (subpath))) + if ((status > 0) && (status < (int) sizeof (subpath))) cow_read_bus (subpath); return (0); -- 2.30.2