diff options
author | Ron Yorston <rmy@pobox.com> | 2023-12-31 14:07:09 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-12-31 14:07:09 +0000 |
commit | 62c3c07d04a8e48ce221fe84fd73e2fefb94c760 (patch) | |
tree | 706590cb44a4020d9ea3fe9e8c68238a2fd5693c /include | |
parent | 9d619a83a479f6760cdfcadcc0fd0ef1bd110e39 (diff) | |
download | busybox-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.h | 4 |
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__) | ||
239 | int ffs(int i); | 240 | int 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 |