Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
pdfcrack: don't use C23 ommitted parameter names
To:
Benoit Lecocq <benoit@openbsd.org>
Cc:
ports@openbsd.org
Date:
Thu, 4 Dec 2025 17:31:45 +0100

Download raw body.

Thread
pdfcrack fails to compile on gcc archs because it uses a feature only
available in C23. It seems clang is more forgiving here since ommitted
names are AFAIK a C++17 feature.

Fixing the two cases is trivial. This is the proper fix for pdfcrack on
sparc64.
-- 
:wq Claudio

Index: patches/patch-benchmark_c
===================================================================
RCS file: patches/patch-benchmark_c
diff -N patches/patch-benchmark_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-benchmark_c	4 Dec 2025 12:39:08 -0000
@@ -0,0 +1,14 @@
+Ommitted parameter names is a C23 feature.
+
+Index: benchmark.c
+--- benchmark.c.orig
++++ benchmark.c
+@@ -40,7 +40,7 @@ static volatile bool finished = false;
+ 
+ /** interruptBench is used to stop the current benchmark */
+ static void
+-interruptBench(int) {
++interruptBench(int dummy) {
+   finished = true;
+ }
+ 
Index: patches/patch-main_c
===================================================================
RCS file: patches/patch-main_c
diff -N patches/patch-main_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-main_c	4 Dec 2025 12:39:08 -0000
@@ -0,0 +1,14 @@
+Ommitted parameter names is a C23 feature.
+
+Index: main.c
+--- main.c.orig
++++ main.c
+@@ -37,7 +37,7 @@
+ 
+ /** alarmInterrupt is used to print out the progress at specific intervals */
+ static void
+-alarmInterrupt(int) {
++alarmInterrupt(int dummy) {
+   if(!printProgress())
+     alarm(PRINTERVAL);
+ }