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 D2E7113908F for ; Tue, 24 Jan 2017 06:50:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 245A8E0DDE; Tue, 24 Jan 2017 06:50:12 +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 F0C55E0DDB for ; Tue, 24 Jan 2017 06:50:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F37A7341698 for ; Tue, 24 Jan 2017 06:50:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 91AC22D55 for ; Tue, 24 Jan 2017 06:50:08 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1485215292.0fa69c398bad7bda3486b713e995be01847126d1.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: scanelf.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 0fa69c398bad7bda3486b713e995be01847126d1 X-VCS-Branch: master Date: Tue, 24 Jan 2017 06:50:08 +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: f2af6072-dc10-4f6b-b07f-09a62505337c X-Archives-Hash: c09afbc411bfa402fc343deb4b65aa09 commit: 0fa69c398bad7bda3486b713e995be01847126d1 Author: Mike Frysinger gentoo org> AuthorDate: Mon Jan 23 23:48:12 2017 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Jan 23 23:48:12 2017 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=0fa69c39 scanelf: change abs() to a size_t cast The point of using abs here was to avoid a signed-vs-unsigned warning, but it doesn't actually work because abs() returns a signed integer. Since we always know end is larger than start, cast the result to a size_t instead. scanelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanelf.c b/scanelf.c index 9c52ced..2729d0f 100644 --- a/scanelf.c +++ b/scanelf.c @@ -836,7 +836,7 @@ static void scanelf_file_rpath(elfobj *elf, char *found_rpath, char **ret, size_ while (start) { \ rpath_security_checks(elf, start, get_elfdtype(word)); \ end = strchr(start, ':'); \ - len = (end ? abs(end - start) : strlen(start)); \ + len = (end ? (size_t)(end - start) : strlen(start)); \ if (use_ldcache) { \ size_t n; \ const char *ldpath; \