Remove use of scoped_restore_tmpl from scoped_restore_warning_hook
The warning_hook_handler function pointer takes va_list as
an argument, which on some platforms (mingw64) includes some
attributes. Attributes get ignored in template arguments.
This led to the compiler warning: