[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compile LUA for 16-bit target problems/bug
- From: Paul Ducklin <pducklin@...>
- Date: Tue, 7 Mar 2023 20:35:16 +0000
> -Wunused-value
It’s hard to imagine how this warning could be considered “low-to-negative value”.
It always means that there is some redundancy in your code, which almost always implies that you have made a mistake.
Perhaps you saved a result into a variable but later “retrieved” it for use from the wrong place (e.g. saving ‘curr_buff_limit’ but later passing ‘buff_absolute_maxlen’ to a later function)?
Perhaps you refactored your code but never quite finished the job, or changed some behaviour incorrectly?
Perhaps you have some clumsy cross-platform macro code generation mess that leaks unwanted and even potentially incorrect code into the final compile for some build targets, implying that your cross-platformness is not as well-tested as you thought?
(Unused values that aren’t needed should be removed. They are just a needless complication. Unused values that are needed represent a bug that needs fixing. Unused values that you can’t immediately explain imply #preprocesor madness you can’t excuse…)