process: refactor emitWarning
Currently the code does a couple of checks to often even though they are not necessary.
Also remove a double whitespace in a error comment.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines