Browse Source

softmagic: Disable noisy debug messages

Christoph Biedl 2 years ago
parent
commit
8fdc8341a0
2 changed files with 26 additions and 0 deletions
  1. 1 0
      debian/patches/series
  2. 25 0
      debian/patches/upstream.mute-debug-warning.patch

+ 1 - 0
debian/patches/series

@@ -5,6 +5,7 @@ cherry-pick-all-since-5.43-release.patch
 
 # patches that should go upstream
 upstream.disable.att3b.patch
+upstream.mute-debug-warning.patch
 
 # local modifications
 local.support-local-definitions-in-etc-magic.patch

+ 25 - 0
debian/patches/upstream.mute-debug-warning.patch

@@ -0,0 +1,25 @@
+Subject: Disable debug messages
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2022-12-20
+Forwarded: https://mailman.astron.com/pipermail/file/2022-December/001018.html
+
+--- a/src/softmagic.c
++++ b/src/softmagic.c
+@@ -1461,7 +1461,7 @@
+ 	// On purpose not INTMAX_MAX
+ 	if (lhs >= INT_MAX || lhs <= INT_MIN ||
+ 	    off >= INT_MAX || off <= INT_MIN) {
+-		fprintf(stderr, "lhs/off overflow %jd %jd\n", lhs, off);
++/*		fprintf(stderr, "lhs/off overflow %jd %jd\n", lhs, off); */
+ 		return 1;
+ 	}
+ 	   
+@@ -1497,7 +1497,7 @@
+ 	if (m->in_op & FILE_OPINVERSE)
+ 		offset = ~offset;
+ 	if (offset >= UINT_MAX) {
+-		fprintf(stderr, "offset overflow %jd\n", offset);
++/*		fprintf(stderr, "offset overflow %jd\n", offset); */
+ 		return 1;
+ 	}
+ 	*rv = CAST(uint32_t, offset);