diff options
author | Tobias Jahnke <tobias.jahnke@microchip.com> | 2019-09-12 10:23:09 +0200 |
---|---|---|
committer | Tobias Jahnke <tobias.jahnke@microchip.com> | 2019-09-12 10:23:09 +0200 |
commit | 02b34d1e71ccadfa97fa5412e635b41142c5bd20 (patch) | |
tree | 18d25429528539a378417ff40a7492d423c56092 /ucs2-interface/ucs-xml/UcsXml.c | |
parent | 6043c1ae174905e4bfd06bc5ed89e09c7ef9c7cb (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.c')
-rw-r--r-- | ucs2-interface/ucs-xml/UcsXml.c | 4 |
1 files changed, 2 insertions, 2 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); } - |