diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-03-06 13:51:08 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-03-06 13:51:08 (GMT) |
commit | 8248953df197e5c6c01c501be3fb8f7c1dcb9b0b (patch) | |
tree | aa2b9502f8eacbeab6ab65c6fa41505aa9b8a36d /Source/CTest/cmCTestSubmit.cxx | |
parent | 70b01d45067c2429ee2a7c0acc6778235cc7d3bb (diff) | |
download | CMake-8248953df197e5c6c01c501be3fb8f7c1dcb9b0b.zip CMake-8248953df197e5c6c01c501be3fb8f7c1dcb9b0b.tar.gz CMake-8248953df197e5c6c01c501be3fb8f7c1dcb9b0b.tar.bz2 |
COMP: Remove warning and fix the logic
Diffstat (limited to 'Source/CTest/cmCTestSubmit.cxx')
-rw-r--r-- | Source/CTest/cmCTestSubmit.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx index 601b90a..1010589 100644 --- a/Source/CTest/cmCTestSubmit.cxx +++ b/Source/CTest/cmCTestSubmit.cxx @@ -558,7 +558,6 @@ bool cmCTestSubmit::SubmitUsingXMLRPC(const cmStdString& localprefix, const cmStdString& url) { xmlrpc_env env; - xmlrpc_value *result; std::string ctestVersion = cmVersion::GetCMakeVersion(); const char *state_name; @@ -576,6 +575,8 @@ bool cmCTestSubmit::SubmitUsingXMLRPC(const cmStdString& localprefix, int cnt = 32; for ( it = files.begin(); it != files.end(); ++it ) { + xmlrpc_value *result; + std::string local_file = localprefix + "/" + *it; std::cout << "Submit file: " << local_file.c_str() << std::endl; struct stat st; @@ -592,15 +593,15 @@ bool cmCTestSubmit::SubmitUsingXMLRPC(const cmStdString& localprefix, { return false; } - + unsigned char *fileBuffer = new unsigned char[fileSize]; unsigned char *encodedFileBuffer = new unsigned char[encodedSize]; if ( fread(fileBuffer, 1, fileSize, fp) != fileSize ) { delete [] fileBuffer; delete [] encodedFileBuffer; - return false; fclose(fp); + return false; } fclose(fp); @@ -649,10 +650,10 @@ bool cmCTestSubmit::SubmitUsingXMLRPC(const cmStdString& localprefix, } printf("%s\n", state_name); - } - /* Dispose of our result value. */ - xmlrpc_DECREF(result); + /* Dispose of our result value. */ + xmlrpc_DECREF(result); + } /* Clean up our error-handling environment. */ xmlrpc_env_clean(&env); |