mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
cam(4): Fix some warnings
When bcopy is treated as memcpy/memmove, Clang produces warnings that the size argument doesn't match the type of the source. This is true, it doesn't match; we're aliasing the source. Explicitly cast the source pointer to the expected type to remove the warning. No functional change. Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
afbd12c110
commit
b1631dfb46
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323257
@ -5100,8 +5100,8 @@ scsi_sense_sbuf(struct cam_device *device, struct ccb_scsiio *csio,
|
||||
* errors on finicky architectures. We don't
|
||||
* ensure that the sense data is pointer aligned.
|
||||
*/
|
||||
bcopy(&csio->sense_data, &sense,
|
||||
sizeof(struct scsi_sense_data *));
|
||||
bcopy((struct scsi_sense_data **)&csio->sense_data,
|
||||
&sense, sizeof(struct scsi_sense_data *));
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
@ -5225,8 +5225,8 @@ scsi_extract_sense_ccb(union ccb *ccb,
|
||||
return (0);
|
||||
|
||||
if (ccb->ccb_h.flags & CAM_SENSE_PTR)
|
||||
bcopy(&ccb->csio.sense_data, &sense_data,
|
||||
sizeof(struct scsi_sense_data *));
|
||||
bcopy((struct scsi_sense_data **)&ccb->csio.sense_data,
|
||||
&sense_data, sizeof(struct scsi_sense_data *));
|
||||
else
|
||||
sense_data = &ccb->csio.sense_data;
|
||||
scsi_extract_sense_len(sense_data,
|
||||
|
Loading…
Reference in New Issue
Block a user