libceph: make ceph_pr_addr take an struct ceph_entity_addr pointer
GCC9 is throwing a lot of warnings about unaligned accesses by callers of ceph_pr_addr. All of the current callers are passing a pointer to the sockaddr inside struct ceph_entity_addr. Fix it to take a pointer to a struct ceph_entity_addr instead, and then have the function make a copy of the sockaddr before printing it. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:

committed by
Ilya Dryomov

parent
cede185b1b
commit
b726ec972c
@@ -271,7 +271,7 @@ static int decode_locker(void **p, void *end, struct ceph_locker *locker)
|
||||
|
||||
dout("%s %s%llu cookie %s addr %s\n", __func__,
|
||||
ENTITY_NAME(locker->id.name), locker->id.cookie,
|
||||
ceph_pr_addr(&locker->info.addr.in_addr));
|
||||
ceph_pr_addr(&locker->info.addr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user