That function will still do what it is suppose to do if you take out the DoCmd.SetWarnings statements, it will just be more annoying to the user.
On a fresh install of Access there's a checkbox setting that says something like 'Confirm Database Updates' which is turned on by default. So whenever an action query is run (APPEND, UPDATE, MAKE TABLE) it displays a prompt to confirm that query before running it ('Access is going to Append 4 Rows. Do you want to continue this action?').
DoCmd.SetWarnings False will override that setting so the user doesn't have to confirm the action query, it just runs. Then when they were done, the guy who wrote that code, turned the confirmations back on with DoCmd.SetWarnings True
Like I said, removing the .SetWarning statements will not have any effect on the code other than making it more annoying to run. Comment them out, then run it to see what I mean--you won't break anything. Then uncomment them to bring them back.