silence warnings on llvm / ubuntu
These changes silence warnings on llvm/ubuntu 22.
Ubuntu clang version 14.0.0-1ubuntu1.1
The casts are safe since they are implicitly done.
Do we want to silence the warning about unused compiler args on master or only on a release branch? It may be better to leave the warnings on master, so we know about them, and only silence on the release branch.