Fix MSVC warnings for error.c
Merge pull request #2126 from kyab/fix_msvc_warning_error.c

Fix MSVC warnings for error.c