From: Daniel Wagner <[email protected]>
When the error path is taken, uid was not initialized. This
is not a problem since we also pass in the error code to the
callback. clang complains about this.
---
Hi,
I tried clang again. The last time clang was not yet really ready
for ConnMan. This time it looks really good. This patch is the
result of this attempt. Unfortunately, I had to drop
-Wcast-align because
pktinfo = (struct in6_pktinfo *)CMSG_DATA(cmsg);
is increasing the alignment requirements. I haven't really figured
how to fix this. I'll gonna ask the experts, since we are not
the only one suffering from this problem. Google shows many packages
having the same problem (radvd, avahi, ...)
Obviously, the interesting thing is, does it blend???
Built with gcc and stripped:
-rwxrwxr-x. 1 wagi wagi 805504 Nov 12 10:08 src/connmand
built with clang/llvm and stripped:
-rwxrwxr-x. 1 wagi wagi 739464 Nov 12 10:07 src/connmand
And yes, the clang version of ConnMan runs just fine.
cheers,
daniel
src/dbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/dbus.c b/src/dbus.c
index a584bb3..4943b96 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -421,7 +421,7 @@ static void get_connection_unix_user_reply(DBusPendingCall
*call,
DBusMessageIter iter;
DBusMessage *reply;
int err = 0;
- unsigned int uid;
+ unsigned int uid = 0;
reply = dbus_pending_call_steal_reply(call);
--
1.8.4.474.g128a96c
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman