From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7471D139694 for ; Fri, 16 Jun 2017 09:36:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 387322240E2; Fri, 16 Jun 2017 09:36:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 08B812240E2 for ; Fri, 16 Jun 2017 09:36:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B478E341A46 for ; Fri, 16 Jun 2017 09:36:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8FC9E7488 for ; Fri, 16 Jun 2017 09:36:35 +0000 (UTC) From: "Alexis Ballier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexis Ballier" Message-ID: <1497605789.bb4c53415c23a7a2e70f97f0690afad9ea06bb8f.aballier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/kvazaar/files/, media-libs/kvazaar/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/kvazaar/files/gcc7.patch media-libs/kvazaar/kvazaar-1.1.0.ebuild X-VCS-Directories: media-libs/kvazaar/files/ media-libs/kvazaar/ X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier X-VCS-Revision: bb4c53415c23a7a2e70f97f0690afad9ea06bb8f X-VCS-Branch: master Date: Fri, 16 Jun 2017 09:36:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0d40f56a-34e0-4f92-bcdd-f596c073e5c5 X-Archives-Hash: eee28b5f2398b27594643edd7b09a262 commit: bb4c53415c23a7a2e70f97f0690afad9ea06bb8f Author: Alexis Ballier gentoo org> AuthorDate: Fri Jun 16 09:15:58 2017 +0000 Commit: Alexis Ballier gentoo org> CommitDate: Fri Jun 16 09:36:29 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb4c5341 media-libs/kvazaar: backport upstream fix to build with gcc7. Package-Manager: Portage-2.3.6, Repoman-2.3.2 media-libs/kvazaar/files/gcc7.patch | 46 +++++++++++++++++++++++++++++++++ media-libs/kvazaar/kvazaar-1.1.0.ebuild | 1 + 2 files changed, 47 insertions(+) diff --git a/media-libs/kvazaar/files/gcc7.patch b/media-libs/kvazaar/files/gcc7.patch new file mode 100644 index 00000000000..12ff8ad00ff --- /dev/null +++ b/media-libs/kvazaar/files/gcc7.patch @@ -0,0 +1,46 @@ +commit 47a9f0de049e77e866ea5bdd4bc7c795ea6dd641 +Author: Ari Lemmetti +Date: Tue Apr 11 12:57:22 2017 +0300 + + Modify and use FILL_ARRAY macro to prevent warning on GCC 7 + + Following warning was given and is false positive + + error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size] + +diff --git a/src/global.h b/src/global.h +index bedcd49..5181674 100644 +--- a/src/global.h ++++ b/src/global.h +@@ -219,7 +219,11 @@ typedef int16_t coeff_t; + // Fill a structure or a static array with val bytes. + #define FILL(var, val) memset(&(var), (val), sizeof(var)) + // Fill a number of elements in an array with val bytes. +-#define FILL_ARRAY(ar, val, size) memset((ar), (val), (size) * sizeof(*(ar))) ++#define FILL_ARRAY(ar, val, size) \ ++{\ ++ void *temp_ptr = (void*)(ar);\ ++ memset((temp_ptr), (val), (size) * sizeof(*(ar)));\ ++} + + #define FREE_POINTER(pointer) { free((void*)pointer); pointer = NULL; } + #define MOVE_POINTER(dst_pointer,src_pointer) { dst_pointer = src_pointer; src_pointer = NULL; } +diff --git a/src/rdo.c b/src/rdo.c +index 52305fd..2579f28 100644 +--- a/src/rdo.c ++++ b/src/rdo.c +@@ -558,10 +558,10 @@ void kvz_rdoq(encoder_state_t * const state, coeff_t *coef, coeff_t *dest_coeff, + // Explicitly tell the only possible numbers of elements to be zeroed. + // Hope the compiler is able to utilize this information. + switch (cg_num) { +- case 1: memset(sig_coeffgroup_flag, 0, 1 * sizeof(sig_coeffgroup_flag[0])); break; +- case 4: memset(sig_coeffgroup_flag, 0, 4 * sizeof(sig_coeffgroup_flag[0])); break; +- case 16: memset(sig_coeffgroup_flag, 0, 16 * sizeof(sig_coeffgroup_flag[0])); break; +- case 64: memset(sig_coeffgroup_flag, 0, 64 * sizeof(sig_coeffgroup_flag[0])); break; ++ case 1: FILL_ARRAY(sig_coeffgroup_flag, 0, 1); break; ++ case 4: FILL_ARRAY(sig_coeffgroup_flag, 0, 4); break; ++ case 16: FILL_ARRAY(sig_coeffgroup_flag, 0, 16); break; ++ case 64: FILL_ARRAY(sig_coeffgroup_flag, 0, 64); break; + default: assert(0 && "There should be 1, 4, 16 or 64 coefficient groups"); + } + diff --git a/media-libs/kvazaar/kvazaar-1.1.0.ebuild b/media-libs/kvazaar/kvazaar-1.1.0.ebuild index 750b6feced9..959e9d94b3d 100644 --- a/media-libs/kvazaar/kvazaar-1.1.0.ebuild +++ b/media-libs/kvazaar/kvazaar-1.1.0.ebuild @@ -38,6 +38,7 @@ DEPEND="${DEPEND} abi_x86_64? ( ${ASM_DEP} )" src_prepare() { + epatch "${FILESDIR}/gcc7.patch" eautoreconf if use test && [ "${PV#9999}" = "${PV}" ]; then # https://bugs.gentoo.org/show_bug.cgi?id=595932