https://lore.kernel.org/linux-xfs/20250221185757.79333-1-preichl@redhat.com/ From: Pavel Reichl To: aalbersh@redhat.com Cc: linux-xfs@vger.kernel.org Subject: [PATCH v2] xfsprogs: Fix mismatched return type of filesize() Date: Fri, 21 Feb 2025 19:57:57 +0100 Message-ID: <20250221185757.79333-1-preichl@redhat.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250217155043.78452-1-preichl@redhat.com> References: <20250217155043.78452-1-preichl@redhat.com> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The function filesize() was declared with a return type of 'long' but defined with 'off_t'. This mismatch caused build issues due to type incompatibility. This commit updates the declaration to match the definition, ensuring consistency and preventing potential compilation errors. Fixes: 73fb78e5ee8 ("mkfs: support copying in large or sparse files") Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino --- a/mkfs/proto.c +++ b/mkfs/proto.c @@ -20,7 +20,7 @@ static struct xfs_trans * getres(struct xfs_mount *mp, uint blocks); static void rsvfile(xfs_mount_t *mp, xfs_inode_t *ip, long long len); static int newregfile(char **pp, char **fname); static void rtinit(xfs_mount_t *mp); -static long filesize(int fd); +static off_t filesize(int fd); static int slashes_are_spaces; /* -- 2.48.1