Fix gcc compiler warnings from -Wall

I posted in the forum on this, but it looks like pull requests are the way to go...

I'm attempting to build a package on Fedora 20.  It adds the compiler flag -Wall, so (along with -Werror from configure) I get a lot of build failures.  I've attached a patch to fix various problems including

unused variables or methods (-Wunused)
uninitialized variables (-Wuninitialized)
signed/unsigned comparisons (-Wsign-compare)
order of initiliazers (-Wreorder)