netpbm/netpbm-c99-2.patch
Florian Weimer 2b6ee3cbff GCC 14 compatibility fixes
Drop netpbm-cmuwtopbm.patch because of an out-of-bounds stack write.
This is correctly reported by GCC 14 as a type error.

It looks like the issue was fixed upstream by adding an (uint32_t)
cast to the magic number check a few lines below (not shown in
the patch added in commit 7d3e28cc83 downsteam).

Also stub out converter/other/jpeg2000/libjasper_compat.c because
it is broken.  Fixes another GCC 14 compatibility issue.
2024-01-21 22:21:08 +01:00

42 lines
1.3 KiB
Diff

Remove the contents of libjasper_compat.c. The assignment
*errorP = errorP;
is bogus because it creates a non-null value in *errorP even on
success, and the caller expects a null pointer int his case.
The source file is compiled, but not actually linked in, so this is
only a problem because of the type error that fails the build.
diff --git a/converter/other/jpeg2000/libjasper_compat.c b/converter/other/jpeg2000/libjasper_compat.c
index 101820a321212dc6..e69de29bb2d1d643 100644
--- a/converter/other/jpeg2000/libjasper_compat.c
+++ b/converter/other/jpeg2000/libjasper_compat.c
@@ -1,26 +0,0 @@
-#include "netpbm/nstring.h"
-
-#include "jasper/jasper.h"
-#include "jasper/jas_image.h"
-
-#ifndef JAS_HAVE_PMJAS_IMAGE_DECODE
-
-void
-pmjas_image_decode(jas_stream_t * const in,
- int const fmtArg,
- const char * const optstr,
- jas_image_t ** const imagePP,
- const char ** const errorP) {
-
- jas_image_t * const jasperP = jas_image_decode(in, fmtArg, optstr);
-
- if (jasperP) {
- *imagePP = jasperP;
- *errorP = errorP;
- } else {
- pm_asprintf(errorP, "Failed. Details may have been written to "
- "Standard Error");
- }
-}
-
-#endif