From 342f71e7fbde4ac39cb3d76619cd5230bef35faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Wed, 3 Nov 2021 23:14:32 +0200 Subject: [PATCH] Fix compilation failure on aarch64 with gcc 10.3 Ubuntu 21.04 According to C++ spec: If an inline function or variable (since C++17) with external linkage is defined differently in different translation units, the behavior is undefined. The undefined behaviour causes link errors for cpimport binary. /usr/bin/ld: /tmp/cpimport.bin.av067N.ltrans0.ltrans.o:(.data.rel.ro+0x6c8): undefined reference to `WriteEngine::ColumnOp::isEmptyRow(unsigned long*, unsigned char const*, int)' The isEmptyRow method is defined as inline in the cpp file and not inline in the header file. As the method is not used as part of an external API by any of the callers, nor is it subclassed, mark it as a normal (non virtual) *inline* member function. --- writeengine/wrapper/we_colop.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/writeengine/wrapper/we_colop.h b/writeengine/wrapper/we_colop.h index 51555c45f..87afd1eea 100644 --- a/writeengine/wrapper/we_colop.h +++ b/writeengine/wrapper/we_colop.h @@ -221,9 +221,9 @@ public: /** * @brief Check whether it is an empty row */ - EXPORT virtual bool isEmptyRow(uint64_t* curVal, - const uint8_t* emptyVal, - const int colWidth); + inline bool isEmptyRow(uint64_t* curVal, + const uint8_t* emptyVal, + const int colWidth); /** * @brief Check whether it is a valid column