Forums
[SOLVED] PATCH: Fix "warning: value computed is not use - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: [SOLVED] PATCH: Fix "warning: value computed is not use (/showthread.php?tid=1497)



[SOLVED] PATCH: Fix "warning: value computed is not use - antoniovazquez - 05-31-2011

Fix return value not used warning by appending void before the desired expression. See http://publib.boulder.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=/com.ibm.ztpf-ztpfdf.doc_put.cur/gtpm1/m1rhvcu.html for more info.

Patch: http://www.mediafire.com/file/ca71hp3z4x5o149/warning_return_value_not_used.patch


- NaN - 06-01-2011

Quote:warning: value computed is not used
It is not a function but a variable being incremented. Prepending a void cast to it is rather irritating.


- antoniovazquez - 06-01-2011

But it fixes the warning and works. The thing is that I think that a clean compilation is needed. I know that prepending void casts is ugly but needed in order to keep clean outputs and detecting fails. If you leave this you'll end with 500 warnings in your code. Someone has to fix them. Thanks


- joevenzon - 06-01-2011

I agree with NaN. If a clean compile is required, we can disable that warning.


- antoniovazquez - 06-02-2011

joevenzon Wrote:I agree with NaN. If a clean compile is required, we can disable that warning.

Evaluate what is what you need: http://tigcc.ticalc.org/doc/faq.html#99

I think that will fix a bug or a warning Smile


- antoniovazquez - 06-03-2011

Have had a look to that? Thanks!


- antoniovazquez - 06-05-2011

SOLVED. Smile