Thread overview
Warning re ignored return value
Aug 04
Don Allen
August 04

Is there a way to request that dmd warn about instances where the return values of non-void functions are ignored? dmd appears not to do that by default and I checked the documentation of the command-line options and didn't see it (hopefully I missed it; it would be nice to have).

/Don

August 04

On 8/4/22 7:39 PM, Don Allen wrote:

>

Is there a way to request that dmd warn about instances where the return values of non-void functions are ignored? dmd appears not to do that by default and I checked the documentation of the command-line options and didn't see it (hopefully I missed it; it would be nice to have).

Not sure if it's implemented yet but there's @mustuse:

https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1038.md

-Steve

August 05

On Friday, 5 August 2022 at 00:14:33 UTC, Steven Schveighoffer wrote:

>

On 8/4/22 7:39 PM, Don Allen wrote:

>

Is there a way to request that dmd warn about instances where the return values of non-void functions are ignored? dmd appears not to do that by default and I checked the documentation of the command-line options and didn't see it (hopefully I missed it; it would be nice to have).

Not sure if it's implemented yet but there's @mustuse:

https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1038.md

-Steve

It's implemented.