The attached patch against emacs-28 suppresses the final remaining GCC 11.2.1 diagnostics that are emitted after emacs-28 is configured with --enable-gcc-warnings on x86-64. The patch is benign, and it's conceivable that changing xmalloc etc. to always return nonnull fixes unlikely and obscure bugs (though I haven't checked this). However, I didn't install the patch into the emacs-28 branch on the off-chance that Eli would prefer this sort of thing to be installed into the master branch.