Remove variables that are set but not used

This fixes build warnings with gcc.
Use the right data type for some local variables

pDecEngine->uiOffset is an uint64_t as well, and *pSliceNum
is uint32_t.

This fixes warnings about comparison between signed and unsigned
in gcc and msvc.
Add casts to avoid warnings about comparison between signed and unsigned

This fixes warnings with gcc and msvc.
Merge pull request #1488 from mstorsjo/fix-warnings

Fix warnings with gcc and MSVC