Progress report; I'm now down to 691 warnings. Pretty good score I think. All the unused variables are gone. It appears lots of functions were created with a template with a bunch of generic variables defined at the top. After I fixed that I went on to integrate rproto.h so I could include the function declarations. Turns out the version I had didn't match the current copy of the game, so I have to make my own. There were lots of functions that had a return type of int that didn't return anything. Looks like MSVC is not real fan of that. I squashed some warnings, and made sure the function returned the correct type. I just set most of the to void and went on. However, I am now running into functions where not every control path generates a return. Then, looking at the code, none of the calling routines do any assignment anyway. There are a lot of functions that are like this.
//Do things, but don't return anything
Then, higher in the code, the 0 is never checked anyway. Do I just get rid of the conditional? Do I return 1 on exit? Guess it depends.
So now I just doing unglamorous job of tidying up the code. Each "missing" definition will need it's declaration entry into rproto.h and there are still 641 left of those.