Hi, here are some patches that allow compilation using clang.
Patch #1 uses now memcpy() instead of unaligned macros. Patch #2 fixes the unit test for session code. The test uses wrong enum type. Patch #3 adds quite useless (void *) casts into code. This should not be necessary and looks like a bug in clang. Anyway, at least the code now compiles. One option would be to add just the (void *) and remove the original cast, this way the code might look nicer (avoids double cast). Patch #4 adds (void) cast so that "unused result" warning is not returned by clang. >From these, the patch #2 is a real error. The other patches look quite useless and should probably be fixed in clang side. Cheers, Jukka Jukka Rissanen (4): dhcp: Use memcpy() when get/set data from buffer unit: Wrong enum type used in session code build: Add (void *) cast to avoid clang error build: Add cast to avoid unused result clang warning gdhcp/client.c | 14 +++++++------- gdhcp/common.c | 4 ++-- gdhcp/server.c | 11 +++++------ plugins/loopback.c | 4 ++-- src/config.c | 2 +- src/dnsproxy.c | 4 ++-- src/inet.c | 37 ++++++++++++++++++++++++------------- src/iptables.c | 17 +++++++++-------- src/ntp.c | 2 +- src/rtnl.c | 17 +++++++++++++++++ src/stats.c | 22 +++++++++++----------- tools/iptables-test.c | 17 +++++++++-------- tools/stats-tool.c | 16 ++++++++-------- unit/session-api.c | 2 +- 14 files changed, 99 insertions(+), 70 deletions(-) -- 1.7.11.4 _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
