Rewrite old defadvice using nadvice.el (advice-add)
I actually have local patches which fix this warning (along with loads of others).
See the attached patch (in the form of a .txt since Github in its infinite wisdom does not accept .patch attachments).
It doesn't fix all warnings, tho. I also attached the resulting compilation log with its warnings.
[ Hmm... I don't see the attachments appearing anywhere... it's like Github carefully stashes them in /dev/null or something. It's kind of longish to put it inline, so let me know if you prefer I send them via email, or I could also push them to a scratch/smartparens branch on nongnu.git. ]
I can't find that patch I had unsuccessfully attached, but I pushed a (presumably similar) one to nongnu.git in the scratch/smartparens branch. You can get it with:
git fetch https://git.sv.gnu.org/r/emacs/nongnu.git scratch/smartparens