View Issue Details

IDProjectCategoryView StatusLast Update
0000584fileGeneralpublic2024-12-08 19:02
Reporterdelphij Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.46 
Fixed in VersionHEAD 
Summary0000584: src/apprentice.c should not use file_mdump when COMPILE_ONLY is defined
DescriptionThe symbol is not defined when COMPILE_ONLY is defined and therefore should not be used.
Steps To ReproduceBuild mkmagic
TagsNo tags attached.

Activities

delphij

2024-12-08 02:08

reporter  

0001-src-apprentice.c-Do-not-use-file_mdump-when-COMPILE_.patch (712 bytes)   
From 4902811f6e602b27d77eaebd64e3b26125bc2b2e Mon Sep 17 00:00:00 2001
From: Xin LI <delphij@FreeBSD.org>
Date: Sat, 7 Dec 2024 18:06:56 -0800
Subject: [PATCH] src/apprentice.c: Do not use file_mdump when COMPILE_ONLY is
 defined.

---
 src/apprentice.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/apprentice.c b/src/apprentice.c
index cf040cdd..954450e1 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
@@ -1148,8 +1148,10 @@ apprentice_sort(const void *a, const void *b)
 				return 0;
 			file_magwarn1("Duplicate magic entry `%s'",
 			    ma->mp->desc);
+#ifndef COMPILE_ONLY
 			file_mdump(ma->mp);
 			file_mdump(mb->mp);
+#endif
 			return 0;
 		}
 		return x > 0 ? -1 : 1;
-- 
2.47.1

christos

2024-12-08 19:02

manager   ~0004126

Fixed, thanks!

Issue History

Date Modified Username Field Change
2024-12-08 02:08 delphij New Issue
2024-12-08 02:08 delphij File Added: 0001-src-apprentice.c-Do-not-use-file_mdump-when-COMPILE_.patch
2024-12-08 19:02 christos Assigned To => christos
2024-12-08 19:02 christos Status new => assigned
2024-12-08 19:02 christos Status assigned => resolved
2024-12-08 19:02 christos Resolution open => fixed
2024-12-08 19:02 christos Fixed in Version => HEAD
2024-12-08 19:02 christos Note Added: 0004126