aboutsummaryrefslogtreecommitdiffstats
path: root/ucs2-interface
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-09-26 20:06:49 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2019-09-26 20:06:49 +0000
commit495e78645e74ab7ef0323fb1b403e3a881a73db7 (patch)
treebdd086cec4a7daac2b517aa8364ea33acbb4919b /ucs2-interface
parent9f03774097a6bf531d08356da4ccc2a5af6ad47a (diff)
parent02b34d1e71ccadfa97fa5412e635b41142c5bd20 (diff)
Merge "unicens: support reproducible build"
Diffstat (limited to 'ucs2-interface')
-rw-r--r--ucs2-interface/ucs-xml/UcsXml.c4
-rw-r--r--ucs2-interface/ucs-xml/UcsXml_Private.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/ucs2-interface/ucs-xml/UcsXml.c b/ucs2-interface/ucs-xml/UcsXml.c
index 7715cd4..5c8c346 100644
--- a/ucs2-interface/ucs-xml/UcsXml.c
+++ b/ucs2-interface/ucs-xml/UcsXml.c
@@ -39,7 +39,8 @@
/************************************************************************/
#define COMPILETIME_CHECK(cond) (void)sizeof(int[2 * !!(cond) - 1])
-#define RETURN_ASSERT(result) { UcsXml_CB_OnError("Assertion in file=%s, line=%d", 2, __FILE__, __LINE__); return result; }
+#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)
+#define RETURN_ASSERT(result) { UcsXml_CB_OnError("Assertion in file=%s, line=%d", 2, __FILENAME__, __LINE__); return result; }
#define MISC_HB(value) ((uint8_t)((uint16_t)(value) >> 8))
#define MISC_LB(value) ((uint8_t)((uint16_t)(value) & (uint16_t)0xFF))
#define ROUTE_AUTO_ID_START (0x8000)
@@ -1636,4 +1637,3 @@ static bool IsAutoRouteId(uint16_t id, PrivateData_t *priv)
assert(NULL != priv);
return (id >= ROUTE_AUTO_ID_START && id <= priv->autoRouteId);
}
-
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)