On Mon Mar 3 22:25:34 2025 +0000, Alfred Agrell wrote:
That's `used` (emit into binary even if unused from C code), not `unused` (suppress warning if unused, but do optimize it out). Latter would be reasonable (as would `static inline` (at least usually, not sure how it interacts with those statics)), but former is indeed silly. But in this case, I'd rather move it to some suitable .c file.
This is second variant of common LTO functions (they were in `tools/tools.h` before). If I remove "used" attribute from function definition then compiler emits warning (`-Wunused-function`) and with `-Werror` it produces build error - that's because not all of them are used in affected tools. Both variants - "used" attribute or "inline" - are looking not so good as it should be but I've chosen first one. However I'll apply your suggestions if there're any.