diff mbox series

[04/25] child: fix data type comparison on child_run

Message ID 20220209222610.438470-5-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series dbench: fix compile warnings and update a bit | expand

Commit Message

Luis Chamberlain Feb. 9, 2022, 10:25 p.m. UTC
Use an unsigned int when comparing values returned by
strlen(). This fixes this compile warning:

child.c:447:39: warning: comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
[-Wsign-compare]
  447 |                               if (len > strlen(line +13)) {
      |

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 child.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/child.c b/child.c
index 04bc474..d340860 100644
--- a/child.c
+++ b/child.c
@@ -441,7 +441,7 @@  loop_again:
 			int count = RWBUFSIZE;
 			
 			while (count > 0) {
-			      int len;
+			      unsigned int len;
 
 			      len = count;
 			      if (len > strlen(line +13)) {