Warning: Method argument is not used

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning: Method argument is not used

Jason Martin
Is there a way to ignore this warning without using variable=variable?

CPU cycles wasted right?

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Warning: Method argument is not used

rvjansen
I trust the HotSpot optimizer will blow this away. I recently discovered another place where you get a warning like this, which is when you reference a variable only in a dependent class. We can look for where this warning is issued - as well as the rangecheck that gives you the ‘clause cannot be reached’ warning that also sometimes trips me up. Unfortunately, I am too fuzzy to note it down because they mostly strike when I have other higher priority work to do. I do the variable=variable thing because I don’t like any warning in production code.

Maybe make an optional argument out of it with a default value?

best regards,

René.


> On 17 Apr 2018, at 07:30, Jason Martin <[hidden email]> wrote:
>
> Is there a way to ignore this warning without using variable=variable?
>
> CPU cycles wasted right?
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=ilutYvJeFkC0qvsMjTyIsSXmCJh67hRKRgNJWzE7Scw&s=pdCBX5oNp9QGsiFBI-F6dcMZY9iFyb9oP-EcZZLUSfg&e=
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/