summaryrefslogtreecommitdiffstats
path: root/bin/ls
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-01-06 02:50:38 +0000
committerandrew <andrew@FreeBSD.org>2013-01-06 02:50:38 +0000
commit84aa559c28c182fbcef49966918e53d34be88df1 (patch)
treee2bed6caf5cfc69268bb6113450ddd99cc68fe2a /bin/ls
parenteee69c44e4785f5a588b13c5f9a6dffdb86247b6 (diff)
downloadFreeBSD-src-84aa559c28c182fbcef49966918e53d34be88df1.zip
FreeBSD-src-84aa559c28c182fbcef49966918e53d34be88df1.tar.gz
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.
Diffstat (limited to 'bin/ls')
-rw-r--r--bin/ls/util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ls/util.c b/bin/ls/util.c
index a50eca4..f8466cd 100644
--- a/bin/ls/util.c
+++ b/bin/ls/util.c
@@ -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('\\');
OpenPOWER on IntegriCloud