Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: fix lint warning on i386



details:   https://anonhg.NetBSD.org/src/rev/0476e8428221
branches:  trunk
changeset: 1023779:0476e8428221
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Sep 26 03:23:06 2021 +0000

description:
make: fix lint warning on i386

cond.c(800): warning: argument #3 is converted from 'unsigned char' to
    'unsigned int' due to prototype [259]

diffstat:

 usr.bin/make/cond.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 400e1e86872e -r 0476e8428221 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sun Sep 26 03:17:59 2021 +0000
+++ b/usr.bin/make/cond.c       Sun Sep 26 03:23:06 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.279 2021/09/21 23:06:18 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.280 2021/09/26 03:23:06 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*     "@(#)cond.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: cond.c,v 1.279 2021/09/21 23:06:18 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.280 2021/09/26 03:23:06 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -189,9 +189,9 @@
 static const char opname[][3] = { "<", "<=", ">", ">=", "==", "!=" };
 
 static bool
-is_token(const char *str, const char *tok, size_t len)
+is_token(const char *str, const char *tok, unsigned char len)
 {
-       return strncmp(str, tok, len) == 0 && !ch_isalpha(str[len]);
+       return strncmp(str, tok, (size_t)len) == 0 && !ch_isalpha(str[len]);
 }
 
 static Token



Home | Main Index | Thread Index | Old Index