From owner-svn-src-head@freebsd.org Sat Aug 26 18:29:59 2017 Return-Path: Delivered-To: svn-src-head@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 A97A1DD7EDA; Sat, 26 Aug 2017 18:29:59 +0000 (UTC) (envelope-from imp@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 6E36D748A6; Sat, 26 Aug 2017 18:29:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7QITwk7099659; Sat, 26 Aug 2017 18:29:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7QITwJF099658; Sat, 26 Aug 2017 18:29:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708261829.v7QITwJF099658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 26 Aug 2017 18:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322935 - head/sys/boot/geli X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/boot/geli X-SVN-Commit-Revision: 322935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Aug 2017 18:29:59 -0000 Author: imp Date: Sat Aug 26 18:29:58 2017 New Revision: 322935 URL: https://svnweb.freebsd.org/changeset/base/322935 Log: Fix warnings due to type mismatch. Cast ctxp to caddr_t to pass data as expected. While void * is a universal type, char * isn't (and that's what caddr_t is defined as). One could argue these prototypes should take void * rather than caddr_t, but changing that is much more invasive. Sponsored by: Netflix Modified: head/sys/boot/geli/geliboot_crypto.c Modified: head/sys/boot/geli/geliboot_crypto.c ============================================================================== --- head/sys/boot/geli/geliboot_crypto.c Sat Aug 26 18:29:53 2017 (r322934) +++ head/sys/boot/geli/geliboot_crypto.c Sat Aug 26 18:29:58 2017 (r322935) @@ -82,17 +82,17 @@ geliboot_crypt(u_int algo, int enc, u_char *data, size rijndael_set_key(&ctxp->key1, key, xts_len / 2); rijndael_set_key(&ctxp->key2, key + (xts_len / 16), xts_len / 2); - enc_xform_aes_xts.reinit(ctxp, iv); + enc_xform_aes_xts.reinit((caddr_t)ctxp, iv); switch (enc) { case 0: /* decrypt */ for (i = 0; i < datasize; i += AES_XTS_BLOCKSIZE) { - enc_xform_aes_xts.decrypt(ctxp, data + i); + enc_xform_aes_xts.decrypt((caddr_t)ctxp, data + i); } break; case 1: /* encrypt */ for (i = 0; i < datasize; i += AES_XTS_BLOCKSIZE) { - enc_xform_aes_xts.encrypt(ctxp, data + i); + enc_xform_aes_xts.encrypt((caddr_t)ctxp, data + i); } break; }