From nobody Sun Jul 2 03:54:33 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QtwD93qQHz4k2ky; Sun, 2 Jul 2023 03:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtwD93PN3z3xxN; Sun, 2 Jul 2023 03:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688270073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYVwof7a5ouiOJVU3q+tDjO+wgKAy93jxw5LYaNtukM=; b=qJ1gfith8ioZqE1mBW1u/ihBCvxL+WgTqD26gvxXdR6QdlzSXanXdd14ZJ/uxz5NRvqZ+6 gcfghfyoYs5TNy/fg6EDf+SzBWld1MfetNPlE009jrlWvCKpp6UTLyb/YHVrBIOZaffp1T cJGKbxDKPJ8Yq4A8WAMaKF55UpZo7JCihn0luDX0Ci+DgHiCl8lWXh5P/tiZ2OR5u9JIqp mIq3RtT+B8Y7zhDkw8rlLjCsaJFoIZ9FpyzAJxWwFMHxRtpSAva6WNSKVyRYqk5MhjI3wC jEkUok41bUq+2GkESlXorbFTQk87nlkvNySnhyd++q9F+Fn6ff6pSyPpXVUETQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688270073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYVwof7a5ouiOJVU3q+tDjO+wgKAy93jxw5LYaNtukM=; b=HbgjnXNHbQt9L14PhTg4rFvE+MZ9OhzMtstb7PPgW6irMCu0rKOoMe1qUa0pwu0lntv9hw WEaxAJW1yqwHZMsXTvfkJDxDqmLqlKhoJY5WtfBUh3Qfn759YkF6QiGLGEtEqW2gb8prAB p3tkb5TYxKAHjdxPkT5rxLN2AtCXGUh5X09GunR4SeHxmGBWb0Dj2ua0jr5NGD4LmaVhNr NRQYuvXOAPn+E6fX6Jy2lSYIcKMFqvtu7hCN+P5zPWpveiziFvPnKA0UKOEHjgu6yeVLCN urUeydLyKDj/3LJ7GzWPNhFMeyKYrfdhD0eH1Gk64Ud1M9gSmIIVXoa3Y9lvvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688270073; a=rsa-sha256; cv=none; b=mmgIzo/PROWbxYInzDUemIPsOBmNDqz7zU0bY2Nb+l38/GUqkUl1FPca88H8U8Xp6X9NRi ztgBC5MLWiR+n06cHkW3zSsoNBTXCCAX/k57q9bjle1juwSjsg6S8IpuwJF4PqvlfALO05 OCoL6d9x/le5n/ZLAbMns6123zB04DxE/Uf0Bsegr1ZQMwT/M2hqAkJ8BSOzg4WPf2mSgk uvsQFpXVLjWN0S+3vEN5PaC7O5Z/qHgqHVUJBSFHM4rwk4E85dXNd6BbSHRt8hmSZxKXOT wb48kzYpAnpPkyVivBVOMQlvpvv5ZNOSlE5SNReh0c5SUXomssq5zKvwAfysVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtwD92VQnzt8L; Sun, 2 Jul 2023 03:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3623sXih012358; Sun, 2 Jul 2023 03:54:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3623sXDo012357; Sun, 2 Jul 2023 03:54:33 GMT (envelope-from git) Date: Sun, 2 Jul 2023 03:54:33 GMT Message-Id: <202307020354.3623sXDo012357@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mikhail Teterin Subject: git: 755553f960e1 - main - graphics/libfpx: eliminate a few more compiler-warnings List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 755553f960e1581eff26f9b09b1e1be5c175f97e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mi: URL: https://cgit.FreeBSD.org/ports/commit/?id=755553f960e1581eff26f9b09b1e1be5c175f97e commit 755553f960e1581eff26f9b09b1e1be5c175f97e Author: Mikhail Teterin AuthorDate: 2023-07-02 03:53:29 +0000 Commit: Mikhail Teterin CommitDate: 2023-07-02 03:53:29 +0000 graphics/libfpx: eliminate a few more compiler-warnings If only the original developers of this code had modern compilers... Notified by: pkg-fallout --- graphics/libfpx/files/patch-warnings | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/graphics/libfpx/files/patch-warnings b/graphics/libfpx/files/patch-warnings index 30a022bd5b09..58fa951cc605 100644 --- a/graphics/libfpx/files/patch-warnings +++ b/graphics/libfpx/files/patch-warnings @@ -28,3 +28,55 @@ together object files compiled after #include-ing the ejpeg.h header. - -JPEGEXPORT -int No_JPEG_Header_Flag; + +padP and padWid are not used. That they are being assigned a value +-- multiple times -- is why earlier compilers didn't warn about it. +But modern clang raises a "set but not used" warning... +--- fpx/filter.cpp 2013-09-02 11:45:00.000000000 -0400 ++++ fpx/filter.cpp 2023-07-01 23:41:19.701483000 -0400 +@@ -354,10 +354,8 @@ + goto RETURN; + +- unsigned char *padP, *tmpP, *dstP; +- long x, y, +- padWid = (width + (2 * pad)); // Width of padded line in Pixels ++ unsigned char *tmpP, *dstP; ++ long x, y; + + for (y = 0; y < height; y++) { +- padP = srcComp[k] +(((y + pad) * padWid) * sizeof( Pixel)) + (pad * sizeof( Pixel)); + tmpP = tempcomp[k] + ((y * width) * sizeof( Pixel)); + dstP = dstComp[k] + ((y * width) * sizeof( Pixel)); +@@ -367,5 +365,4 @@ + sum = pixVal + (long)(beta*(double)(pixVal - (long)*dstP) + 0.5); + *dstP = (unsigned char)CLAMP(sum, 0, 255); +- padP += sizeof( Pixel); + tmpP += sizeof( Pixel); + dstP += sizeof( Pixel); + +More set, but unused variables: +--- ri_image/pr_level.cpp 2013-09-02 11:45:00.000000000 -0400 ++++ ri_image/pr_level.cpp 2023-07-01 23:48:29.094528000 -0400 +@@ -1518,5 +1518,4 @@ + // Declare and init some variables before the main loop... + int heightOfBuffer, widthOfBuffer; // Width and height to be written for each bloc +- int yBloc = 0; // Top coordinate in the resolution level + int topInBuffer = 0; // Top coordinate in the buffer + PTile* tile = tiles; // Pointer to the current bloc of the resolution level +@@ -1525,5 +1524,4 @@ + for (short hBloc = 0; hBloc < nbTilesH; ++hBloc) { + +- int xBloc = 0; // Left coordinate in the resolution level + int leftInBuffer = 0; // Left coordinate in the buffer + +@@ -1607,10 +1605,8 @@ + } + +- xBloc += tile->width; // Increment left coordinate in the resolution level + leftInBuffer += widthOfBuffer; // Increment left coordinate in the buffer + ++tile; // Next tile + } + +- yBloc += tile->height; // Increment top coordinate in the resolution level + topInBuffer += heightOfBuffer; // Increment top coordinate in the buffer + }