Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2018 21:21:55 +0000 (UTC)
From:      Piotr Pawel Stefaniak <pstef@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334640 - head/usr.bin/indent
Message-ID:  <201806042121.w54LLtJ8088374@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pstef
Date: Mon Jun  4 21:21:55 2018
New Revision: 334640
URL: https://svnweb.freebsd.org/changeset/base/334640

Log:
  indent(1): fix buildworld after r334632
  
  Fix
  error: comparison of integers of different signs: 'int' and 'unsigned long'
  by casting nitems() to int.
  
  Reported by:	mjg

Modified:
  head/usr.bin/indent/parse.c

Modified: head/usr.bin/indent/parse.c
==============================================================================
--- head/usr.bin/indent/parse.c	Mon Jun  4 21:17:46 2018	(r334639)
+++ head/usr.bin/indent/parse.c	Mon Jun  4 21:21:55 2018	(r334640)
@@ -211,7 +211,7 @@ parse(int tk) /* tk: the code for the construct scanne
 
     }				/* end of switch */
 
-    if (ps.tos >= nitems(ps.p_stack) - 1)
+    if (ps.tos >= (int)nitems(ps.p_stack) - 1)
 	errx(1, "Parser stack overflow");
 
     reduce();			/* see if any reduction can be done */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806042121.w54LLtJ8088374>