Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2013 02:50:39 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r245091 - head/bin/ls
Message-ID:  <201301060250.r062odnl066551@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sun Jan  6 02:50:38 2013
New Revision: 245091
URL: http://svnweb.freebsd.org/changeset/base/245091

Log:
  When WCHAR_MIN == 0 the check if a wchar_t value will always be true. In
  this case skip the test as gcc complains it is always true.

Modified:
  head/bin/ls/util.c

Modified: head/bin/ls/util.c
==============================================================================
--- head/bin/ls/util.c	Sun Jan  6 01:46:01 2013	(r245090)
+++ head/bin/ls/util.c	Sun Jan  6 02:50:38 2013	(r245091)
@@ -184,7 +184,10 @@ prn_octal(const char *s)
 			for (i = 0; i < (int)clen; i++)
 				putchar((unsigned char)s[i]);
 			len += wcwidth(wc);
-		} else if (goodchar && f_octal_escape && wc >= 0 &&
+		} else if (goodchar && f_octal_escape &&
+#if WCHAR_MIN < 0
+                    wc >= 0 &&
+#endif
 		    wc <= (wchar_t)UCHAR_MAX &&
 		    (p = strchr(esc, (char)wc)) != NULL) {
 			putchar('\\');



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