aboutsummaryrefslogtreecommitdiffstats
path: root/erl-build-tool-vars.sh
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-29 06:33:52 +0100
committerBjörn Gustavsson <[email protected]>2015-02-03 08:40:49 +0100
commit8c3baeb1275c2e6a316d3b5203e0598906785cdb (patch)
tree15315c8952ba753ab5e97097989e0e7f87e68f34 /erl-build-tool-vars.sh
parent8c0bebb66ba01b174e6482cd81949eaf08748bcd (diff)
downloadotp-8c3baeb1275c2e6a316d3b5203e0598906785cdb.tar.gz
otp-8c3baeb1275c2e6a316d3b5203e0598906785cdb.tar.bz2
otp-8c3baeb1275c2e6a316d3b5203e0598906785cdb.zip
Suppress warnings for expressions that are assigned to '_'
In c34ad2d5, the compiler learned to silence some warnings for expressions that were explicitly assigned to the '_' variable, as in this example: _ = list_to_integer(S), ok That commit intentionally only made it possible to silence warnings for BIFs that could cause an exception. Warnings would still be produced for: _ = date(), ok because date/0 can never fail and thus making the call completely useless. The reasoning was that such warnings can always be eliminated by eliminating the offending code. While that is true, there is the question about rules and their consistency. It is surprising that '_' can be used to silence some warnings, but has no effect on other warnings. Therefore, we will teach the compiler to silence warnings for the following constructs: * Calls to safe BIFs such as date/0 * Expressions that will cause an exception such as 'X/0' * Terms that are built but not used, such as '{x,X}'
Diffstat (limited to 'erl-build-tool-vars.sh')
0 files changed, 0 insertions, 0 deletions