build: Add -Ywarn-value-discard to scalac opts.