From owner-svn-src-all@freebsd.org Thu Sep 7 07:24:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A04EE0D7C9; Thu, 7 Sep 2017 07:24:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 756012E1B; Thu, 7 Sep 2017 07:24:23 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v877OMuY006676; Thu, 7 Sep 2017 07:24:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v877OM9W006675; Thu, 7 Sep 2017 07:24:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201709070724.v877OM9W006675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 7 Sep 2017 07:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323257 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 323257 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 07:24:24 -0000 Author: cem Date: Thu Sep 7 07:24:22 2017 New Revision: 323257 URL: https://svnweb.freebsd.org/changeset/base/323257 Log: 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 Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Thu Sep 7 05:41:13 2017 (r323256) +++ head/sys/cam/scsi/scsi_all.c Thu Sep 7 07:24:22 2017 (r323257) @@ -5100,8 +5100,8 @@ scsi_sense_sbuf(struct cam_device *device, struct ccb_ * 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,