3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

core: Fix a few compiler warnings

This commit is contained in:
Marcel Holtmann 2014-07-15 22:28:44 +02:00
parent c11be930ea
commit 43f91eb168

View File

@ -26,6 +26,7 @@
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#include <string.h> #include <string.h>
#include <glob.h> #include <glob.h>
#include <ell/ell.h> #include <ell/ell.h>
@ -116,7 +117,6 @@ bool kdbus_destroy_bus(void)
char *kdbus_lookup_bus(void) char *kdbus_lookup_bus(void)
{ {
glob_t gl; glob_t gl;
size_t i;
char *path = NULL; char *path = NULL;
if (glob("/dev/kdbus/*-iwd/bus", GLOB_ONLYDIR, NULL, &gl)) { if (glob("/dev/kdbus/*-iwd/bus", GLOB_ONLYDIR, NULL, &gl)) {
@ -170,6 +170,7 @@ bool kdbus_open_bus(const char *path, const char *name, const char *conn_name)
uint64_t name_type; uint64_t name_type;
char name_param[16]; char name_param[16];
} cmd_hello; } cmd_hello;
uint64_t id, size, n_hash;
if (kdbus_conn >= 0) if (kdbus_conn >= 0)
return false; return false;
@ -208,7 +209,9 @@ bool kdbus_open_bus(const char *path, const char *name, const char *conn_name)
return false; return false;
} }
l_debug("Name: :1.%" PRIu64, cmd_hello.head.id); id = cmd_hello.head.id;
l_debug("Name: :1.%" PRIu64, id);
memcpy(kdbus_id128, cmd_hello.head.id128, sizeof(kdbus_id128)); memcpy(kdbus_id128, cmd_hello.head.id128, sizeof(kdbus_id128));
@ -223,8 +226,11 @@ bool kdbus_open_bus(const char *path, const char *name, const char *conn_name)
kdbus_id128[12], kdbus_id128[13], kdbus_id128[12], kdbus_id128[13],
kdbus_id128[14], kdbus_id128[15]); kdbus_id128[14], kdbus_id128[15]);
l_debug("Bloom size: %" PRIu64, cmd_hello.head.bloom.size); size = cmd_hello.head.bloom.size;
l_debug("Bloom hashes: %" PRIu64, cmd_hello.head.bloom.n_hash); n_hash = cmd_hello.head.bloom.n_hash;
l_debug("Bloom size: %" PRIu64, size);
l_debug("Bloom hashes: %" PRIu64, n_hash);
if (!name_acquire(name)) { if (!name_acquire(name)) {
close(kdbus_conn); close(kdbus_conn);