fix another FTBFS with GCC 14

This commit is contained in:
Michael J Gruber 2024-01-20 17:44:21 +01:00
parent 36c556c951
commit 14fce80add
2 changed files with 66 additions and 1 deletions

View File

@ -0,0 +1,60 @@
From 8f5c77af6c0b84bdea719010cf4f67877e857b2b Mon Sep 17 00:00:00 2001
Message-ID: <8f5c77af6c0b84bdea719010cf4f67877e857b2b.1705768875.git.mjg@fedoraproject.org>
From: Ken Sharp <Ken.Sharp@artifex.com>
Date: Fri, 19 Jan 2024 08:44:33 +0000
Subject: [PATCH] X device - fix compiler 'warning'
Bug #707502 "- -Wincompatible-pointer-types warning in devices/gdevxini.c"
This is probably an oversight from when we changed a load of variables
to size_t.
Seems odd that compilers (well gcc) should refuse to compile becuase of
a warning, but that's compilers. The pointer type is incorrect so let's
fix it.
---
devices/gdevx.h | 4 ++--
devices/gdevxini.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/devices/gdevx.h b/devices/gdevx.h
index 82855ae15..1a513afcd 100644
--- a/devices/gdevx.h
+++ b/devices/gdevx.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2024 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -39,7 +39,7 @@ typedef struct gx_device_X_s {
bool is_buffered;
bool IsPageDevice;
byte *buffer; /* full-window image */
- long buffer_size;
+ size_t buffer_size;
gx_device_color_info orig_color_info;
/* An XImage object for writing bitmap images to the screen */
diff --git a/devices/gdevxini.c b/devices/gdevxini.c
index df489617c..5f68ce035 100644
--- a/devices/gdevxini.c
+++ b/devices/gdevxini.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2023 Artifex Software, Inc.
+/* Copyright (C) 2001-2024 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -621,7 +621,7 @@ x_set_buffer(gx_device_X * xdev)
}
if (mdev->width != xdev->width || mdev->height != xdev->height) {
byte *buffer;
- ulong space;
+ size_t space;
if (gdev_mem_data_size(mdev, xdev->width, xdev->height, &space) < 0 ||
space > xdev->space_params.MaxBitmap) {
--
2.43.0.462.gcdfa2ea447

View File

@ -45,7 +45,7 @@
Name: ghostscript
Summary: Interpreter for PostScript language & PDF
Version: 10.02.1
Release: 6%{?dist}
Release: 7%{?dist}
License: AGPL-3.0-or-later
@ -109,6 +109,8 @@ Patch: ghostscript-10.02.1-txtwrite-device-needs-to-countdown-the-device-on-tex.
Patch: ghostscript-10.02.1-PostScript-Fix-selectdevice.patch
# https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b7beb19ad06e
Patch: 0001-Bug-707130-Cast-to-void-to-avoid-compiler-warning.patch
# https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=8f5c77af6c0b
Patch: 0001-X-device-fix-compiler-warning.patch
# Downstream patches -- these should be always included when doing rebase:
# ------------------
@ -422,6 +424,9 @@ done
# =============================================================================
%changelog
* Sat Jan 20 2024 Michael J Gruber <mjg@fedoraproject.org> - 10.02.1-7
- fix another FTBFS with GCC 14
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 10.02.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild