[packages/libCSS] upstream fixes for gcc 14

atler atler at pld-linux.org
Sun Oct 6 12:52:31 CEST 2024


commit 1717555466a67dd927178afcfd3fc62270ebde46
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Oct 6 11:55:29 2024 +0200

    upstream fixes for gcc 14

 gcc14.patch | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 libCSS.spec |  4 +++-
 2 files changed, 71 insertions(+), 1 deletion(-)
---
diff --git a/libCSS.spec b/libCSS.spec
index 8dae395..684f3bb 100644
--- a/libCSS.spec
+++ b/libCSS.spec
@@ -11,6 +11,7 @@ License:	MIT
 Group:		Libraries
 Source0:	http://download.netsurf-browser.org/libs/releases/libcss-%{version}-src.tar.gz
 # Source0-md5:	eeb912a26c943aa1cc8fa5b5b6ec316b
+Patch0:		gcc14.patch
 URL:		http://www.netsurf-browser.org/projects/libcss/
 BuildRequires:	libparserutils-devel >= 0.2.5
 BuildRequires:	libwapcaplet-devel >= 0.4.3
@@ -36,7 +37,7 @@ Features:
 %description -l pl.UTF-8
 LibCSS to silnik analizujący i wybierający CSS (Cascading Style
 Sheet), napisany w C. Powstał jako część projektu NetSurf i można go
-używać w innych programach na licencji MIT. 
+używać w innych programach na licencji MIT.
 
 Cechy:
 - analizuje CSS, dobry i wadliwy
@@ -76,6 +77,7 @@ Statyczna biblioteka libCSS.
 
 %prep
 %setup -q -n libcss-%{version}
+%patch0 -p1
 
 # create "gen" target just to execute PRE_TARGETS
 printf '\ngen: $(PRE_TARGETS)\n' >> Makefile
diff --git a/gcc14.patch b/gcc14.patch
new file mode 100644
index 0000000..7d1d725
--- /dev/null
+++ b/gcc14.patch
@@ -0,0 +1,68 @@
+From 8619d09102d6cc34d63fe87195c548852fc93bf4 Mon Sep 17 00:00:00 2001
+From: Michael Drake <tlsa at netsurf-browser.org>
+Date: Fri, 24 May 2024 21:19:32 +0100
+Subject: select: select: Squash -Wcalloc-transposed-args (gcc-14)
+
+---
+ src/select/select.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/select/select.c b/src/select/select.c
+index da0aa61..c5ff462 100644
+--- a/src/select/select.c
++++ b/src/select/select.c
+@@ -138,7 +138,7 @@ static css_error css__create_node_data(struct css_node_data **node_data)
+ {
+ 	struct css_node_data *nd;
+ 
+-	nd = calloc(sizeof(struct css_node_data), 1);
++	nd = calloc(1, sizeof(struct css_node_data));
+ 	if (nd == NULL) {
+ 		return CSS_NOMEM;
+ 	}
+@@ -234,7 +234,7 @@ css_error css_select_ctx_create(css_select_ctx **result)
+ 	if (result == NULL)
+ 		return CSS_BADPARM;
+ 
+-	c = calloc(sizeof(css_select_ctx), 1);
++	c = calloc(1, sizeof(css_select_ctx));
+ 	if (c == NULL)
+ 		return CSS_NOMEM;
+ 
+@@ -613,7 +613,7 @@ static css_error css__create_node_bloom(
+ 	*node_bloom = NULL;
+ 
+ 	/* Create the node's bloom */
+-	bloom = calloc(sizeof(css_bloom), CSS_BLOOM_SIZE);
++	bloom = calloc(CSS_BLOOM_SIZE, sizeof(css_bloom));
+ 	if (bloom == NULL) {
+ 		return CSS_NOMEM;
+ 	}
+-- 
+cgit v1.2.3
+
+From 0541e18b442d2f46abc0f0b09e0db950e1b657e5 Mon Sep 17 00:00:00 2001
+From: Michael Drake <tlsa at netsurf-browser.org>
+Date: Fri, 24 May 2024 21:19:20 +0100
+Subject: select: computed: Squash -Wcalloc-transposed-args (gcc-14)
+
+---
+ src/select/computed.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/select/computed.c b/src/select/computed.c
+index 78f3b80..590b8ba 100644
+--- a/src/select/computed.c
++++ b/src/select/computed.c
+@@ -73,7 +73,7 @@ css_error css__computed_style_create(css_computed_style **result)
+ 	if (result == NULL)
+ 		return CSS_BADPARM;
+ 
+-	s = calloc(sizeof(css_computed_style), 1);
++	s = calloc(1, sizeof(css_computed_style));
+ 	if (s == NULL)
+ 		return CSS_NOMEM;
+ 
+-- 
+cgit v1.2.3
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libCSS.git/commitdiff/1717555466a67dd927178afcfd3fc62270ebde46



More information about the pld-cvs-commit mailing list