Compiler warnings #1066

Open
opened 2025-12-05 01:56:59 +00:00 by mweinelt · 1 comment
Member

I was surprised to see the following compiler warnings, because usually Lix doesn't have any 😉

This is lix-project/lix@1e98c01912 on aarch64-linux.

lix> In file included from ../lix/libcmd/repl-interacter.cc:23:
lix> ../lix/libcmd/repl-interacter.hh:49:18: warning: virtual method 'writeHistory' is inside a 'final' class and can never be overridden [-Wunnecessary-virtual-specifier]
lix>    49 |     virtual void writeHistory();
lix>       |                  ^
lix> 1 warning generated.
lix> [207/541] Compiling C++ object lix/libexpr/liblixexpr.so.p/attr-set.cc.o
lix> In file included from ../lix/libexpr/attr-set.cc:1:
lix> ../lix/libexpr/attr-set.hh:124:18: warning: private field 'mem' is not used [-Wunused-private-field]
lix>   124 |     EvalMemory & mem;
lix>       |                  ^
lix> 1 warning generated.
I was surprised to see the following compiler warnings, because usually Lix doesn't have any 😉 This is https://git.lix.systems/lix-project/lix/commit/1e98c019126567260a3ee7f5d6db59b2107f6a1a on aarch64-linux. ``` lix> In file included from ../lix/libcmd/repl-interacter.cc:23: lix> ../lix/libcmd/repl-interacter.hh:49:18: warning: virtual method 'writeHistory' is inside a 'final' class and can never be overridden [-Wunnecessary-virtual-specifier] lix> 49 | virtual void writeHistory(); lix> | ^ lix> 1 warning generated. ``` ``` lix> [207/541] Compiling C++ object lix/libexpr/liblixexpr.so.p/attr-set.cc.o lix> In file included from ../lix/libexpr/attr-set.cc:1: lix> ../lix/libexpr/attr-set.hh:124:18: warning: private field 'mem' is not used [-Wunused-private-field] lix> 124 | EvalMemory & mem; lix> | ^ lix> 1 warning generated. ```
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/4703 ("meson: error on unused variables and unused private fields")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/4703", "number": 4703, "kind": "commit message"}], "cl_meta": {"4703": {"change_title": "meson: error on unused variables and unused private fields"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/4703](https://gerrit.lix.systems/c/lix/+/4703) ("meson: error on unused variables and unused private fields")
mweinelt added this to the 2.95 milestone 2025-12-05 13:06:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1066
No description provided.