The compiler is correct, and there's something wrong in the code. :-)
The function will either return UNZIP_SUCCESS
if it works, or the result of GetLastError
if an exception is raised. Therefore, the first assignment to Result
is unnecessary - there is no path of execution that would cause UNZIP_FAIL
to be returned.