summaryrefslogtreecommitdiffstats
path: root/ucs2-interface/ucs-xml/UcsXml_Private.c
diff options
context:
space:
mode:
authorTobias Jahnke <tobias.jahnke@microchip.com>2019-09-12 10:23:09 +0200
committerTobias Jahnke <tobias.jahnke@microchip.com>2019-09-12 10:23:09 +0200
commit02b34d1e71ccadfa97fa5412e635b41142c5bd20 (patch)
tree18d25429528539a378417ff40a7492d423c56092 /ucs2-interface/ucs-xml/UcsXml_Private.c
parent6043c1ae174905e4bfd06bc5ed89e09c7ef9c7cb (diff)
unicens: support reproducible build
Changed usage of __FILE__ macro to not print absolut paths in warning and error messages Bug-AGL: SPEC-2802 Signed-off-by: Tobias Jahnke <tobias.jahnke@microchip.com> Change-Id: I3755e96cb23f8c782ea00f4b4fdc7df7d08972d7
Diffstat (limited to 'ucs2-interface/ucs-xml/UcsXml_Private.c')
-rw-r--r--ucs2-interface/ucs-xml/UcsXml_Private.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ucs2-interface/ucs-xml/UcsXml_Private.c b/ucs2-interface/ucs-xml/UcsXml_Private.c
index 4fb4e0c..a1ef86c 100644
--- a/ucs2-interface/ucs-xml/UcsXml_Private.c
+++ b/ucs2-interface/ucs-xml/UcsXml_Private.c
@@ -66,7 +66,8 @@ static const char* I2S_PIN_SRXB1 = "SRXB1";
static const char* MUTE_OFF = "NoMuting";
static const char* MUTE_SIGNAL = "MuteSignal";
-#define ASSERT_FALSE(func, par) { UcsXml_CB_OnError("Parameter error in attribute=%s value=%s, file=%s, line=%d", 4, func, par, __FILE__, __LINE__); return false; }
+#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)
+#define ASSERT_FALSE(func, par) { UcsXml_CB_OnError("Parameter error in attribute=%s value=%s, file=%s, line=%d", 4, func, par, __FILENAME__, __LINE__); return false; }
#define CHECK_POINTER(PTR) if (NULL == PTR) { ASSERT_FALSE(PTR, "NULL pointer"); }
static int32_t Str2Int(const char *val)