utf8: Don't rely on char being signed
PATCH 1/2 utf8: Don't rely on char being signed
Even if it gets forced by compile flags in a future commit it's better to avoid this char usage.
Reported-by Natanael Copa
Tested-by Natanael Copa
--- ell/utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ell/utf8.c +1 -1
@@ -93,7 +93,7 @@ LIB_EXPORT int l_utf8_get_codepoint(const char *str, size_t len, wchar_t *cp)if (len ==0 )return 0 ; -if (str[0 ] >0 ) { +if ((signed char ) str[0 ] >0 ) { *cp = str[0 ];return 1 ; }
Signature · 1 line
2.19.1
PATCH 2/2 unit: Define WAIT_ANY if necessary
WAIT_ANY is not POSIX and musl libc doesn't define it. Fix based on
http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch
Reported-by Natanael Copa
Tested-by Natanael Copa
--- unit/test-dbus-message-fds.c | 4 ++++ unit/test-dbus-properties.c | 4 ++++ unit/test-dbus.c | 4 ++++ 3 files changed, 12 insertions(+)
unit/test-dbus-message-fds.c +4 -0
@@ -37,6 +37,10 @@#include <ell/ell.h> #include "ell/dbus-private.h" +#ifndef WAIT_ANY +#define WAIT_ANY (-1)/* Any process */ +#endif +#define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"static pid_t dbus_daemon_pid =-1 ;
unit/test-dbus-properties.c +4 -0
@@ -34,6 +34,10 @@#include <ell/ell.h> #include "ell/dbus-private.h" +#ifndef WAIT_ANY +#define WAIT_ANY (-1)/* Any process */ +#endif +#define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"static pid_t dbus_daemon_pid =-1 ;
unit/test-dbus.c +4 -0
@@ -31,6 +31,10 @@#include <ell/ell.h> +#ifndef WAIT_ANY +#define WAIT_ANY (-1)/* Any process */ +#endif +#define TEST_BUS_ADDRESS "unix:path=/tmp/ell-test-bus"static pid_t dbus_daemon_pid =-1 ;
Signature · 1 line
2.19.1
Hi Andrew,
Quoted 9 lines · Andrew Zaborowski
Even if it gets forced by compile flags in a future commit it's better to avoid this char usage.
Reported-by Natanael CopaTested-by Natanael Copa--- ell/utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Both applied, thanks.
Regards,
-Denis