aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-12-31 14:07:09 +0000
committerRon Yorston <rmy@pobox.com>2023-12-31 14:07:09 +0000
commit62c3c07d04a8e48ce221fe84fd73e2fefb94c760 (patch)
tree706590cb44a4020d9ea3fe9e8c68238a2fd5693c /include
parent9d619a83a479f6760cdfcadcc0fd0ef1bd110e39 (diff)
downloadbusybox-w32-62c3c07d04a8e48ce221fe84fd73e2fefb94c760.tar.gz
busybox-w32-62c3c07d04a8e48ce221fe84fd73e2fefb94c760.tar.bz2
busybox-w32-62c3c07d04a8e48ce221fe84fd73e2fefb94c760.zip
win32: fix clang error/warning
Since clang doesn't seem to know about ffs(3) make it use __builtin_ffs() instead. Fix a warning in process_escape() in winansi.c: result of comparison of constant -1 with expression of type 'WORD' (aka 'unsigned short') is always true. Change the error value returned by process_colour() from -1 to 0xffff. Costs 16 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 88da85243..4abdcf459 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -236,7 +236,11 @@ int strverscmp(const char *s1, const char *s2);
236/* 236/*
237 * strings.h 237 * strings.h
238 */ 238 */
239#if !defined(__clang__)
239int ffs(int i); 240int ffs(int i);
241#else
242# define ffs(i) __builtin_ffs(i)
243#endif
240 244
241/* 245/*
242 * sys/ioctl.h 246 * sys/ioctl.h