Fix some warnings on nightly (#8337)