bsd-user: Suppress gcc 4.x -Wpointer-sign (included in -Wall) warning
PATCH 1/1 bsd-user: Suppress gcc 4.x -Wpointer-sign (included in -Wall) warning
This is the same change as b55266b5 in linux-user.
--- bsd-user/uaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bsd-user/uaccess.c +1 -1
@@ -51,7 +51,7 @@ abi_long target_strlen(abi_ulong guest_addr1) ptr =lock_user (VERIFY_READ , guest_addr, max_len,1 );if (!ptr)return -TARGET_EFAULT ; - len =qemu_strnlen ((char *)ptr, max_len); + len =qemu_strnlen ((const char *)ptr, max_len);unlock_user (ptr, guest_addr,0 ); guest_addr += len;/* we don't allow wrapping or integer overflow */
Signature · 1 line
2.4.6
Quoted 3 lines · Ed Maste
This is the same change as
b55266b5in linux-user.Signed-off-by Ed Maste <[email protected]>
Do you have many more of these bsd related patches to come? It might be easier to deal with them all in one patchseries...
thanks
-- PMM
Quoted 7 lines · Peter Maydell
Quoted 3 lines · Ed Maste
This is the same change as
b55266b5in linux-user.Signed-off-by Ed Maste <[email protected]>Do you have many more of these bsd related patches to come? It might be easier to deal with them all in one patchseries...
I have nothing beyond these two. I caught the missing #include from a build warning, but unfortunately didn't notice this (const char *) difference vs linux-user when I mailed the first patch.
There are some warnings remaining in bsd-user still, but these should be investigated after we sort out the bsd-user rework from Stacy Son and Sean Bruno. I don't expect to have any further work until then.
Peter Maydell
AppliedQuoted 21 lines · Ed Maste
This is the same change as
b55266b5in linux-user.Signed-off-by Ed Maste <[email protected]>--- bsd-user/uaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bsd-user/uaccess.c +1
-2@@ -51,7 +51,7 @@ abi_long target_strlen(abi_ulong guest_addr1) ptr =lock_user (VERIFY_READ , guest_addr, max_len,1 );if (!ptr)return -TARGET_EFAULT ; - len =qemu_strnlen ((char *)ptr, max_len); + len =qemu_strnlen ((const char *)ptr, max_len);unlock_user (ptr, guest_addr,0 ); guest_addr += len;/* we don't allow wrapping or integer overflow */ --
Quoted 1 line
2.4.6
Applied to master, thanks.
-- PMM