Control: tags 952724 patch

I was sufficiently annoyed about this, so I fixed this so that the ICC warning is displayed only once. A patch file for debian/patches is attached.

Description: Only warn once about the missing ICC support

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2021-03-05

--- mupdf-1.17.0+ds1.orig/source/fitz/colorspace.c
+++ mupdf-1.17.0+ds1/source/fitz/colorspace.c
@@ -87,7 +87,12 @@ void fz_new_colorspace_context(fz_contex
 
 void fz_enable_icc(fz_context *ctx)
 {
-	fz_warn(ctx, "ICC support is not available");
+	static int warned = 0;
+
+	if (!warned) {
+		fz_warn(ctx, "ICC support is not available");
+		warned = 1;
+	}
 }
 
 void fz_disable_icc(fz_context *ctx)

Reply via email to