[MOAB-dev] r3416 - in MOAB/trunk: . test/h5file
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Wed Dec 16 13:45:24 CST 2009
Author: kraftche
Date: 2009-12-16 13:45:23 -0600 (Wed, 16 Dec 2009)
New Revision: 3416
Modified:
MOAB/trunk/MBBSPTree.cpp
MOAB/trunk/MBTest.cpp
MOAB/trunk/bsp_tree_test.cpp
MOAB/trunk/test/h5file/h5sets_test.cpp
Log:
fix a few warnings
Modified: MOAB/trunk/MBBSPTree.cpp
===================================================================
--- MOAB/trunk/MBBSPTree.cpp 2009-12-15 17:55:58 UTC (rev 3415)
+++ MOAB/trunk/MBBSPTree.cpp 2009-12-16 19:45:23 UTC (rev 3416)
@@ -1210,7 +1210,8 @@
MBErrorCode MBBSPTreeBoxIter::calculate_polyhedron( BSPTreePoly& poly_out ) const
{
- return poly_out.set( reinterpret_cast<const MBCartVect*>(leafCoords) );
+ const MBCartVect* ptr = reinterpret_cast<const MBCartVect*>(leafCoords);
+ return poly_out.set( ptr );
}
MBErrorCode MBBSPTree::leaf_containing_point( MBEntityHandle tree_root,
Modified: MOAB/trunk/MBTest.cpp
===================================================================
--- MOAB/trunk/MBTest.cpp 2009-12-15 17:55:58 UTC (rev 3415)
+++ MOAB/trunk/MBTest.cpp 2009-12-16 19:45:23 UTC (rev 3416)
@@ -6844,10 +6844,19 @@
const char* argv0 = 0;
MBErrorCode mb_read_fail_test(MBInterface* mb)
{
+ const char BAD_FILE_NAME[] = "non-existant-file.txt";
MBErrorCode rval;
+ FILE* fptr = fopen(BAD_FILE_NAME,"r");
+ if (fptr) {
+ fclose(fptr);
+ std::cout << "Test cannot proceed while file exists: " << BAD_FILE_NAME << std::endl;
+ return MB_FAILURE;
+ }
+
// try reading a non-existant file
- rval = mb->load_file( tmpnam(0) );
+
+ rval = mb->load_file( BAD_FILE_NAME );
if (MB_FILE_DOES_NOT_EXIST != rval)
return MB_FAILURE;
Modified: MOAB/trunk/bsp_tree_test.cpp
===================================================================
--- MOAB/trunk/bsp_tree_test.cpp 2009-12-15 17:55:58 UTC (rev 3415)
+++ MOAB/trunk/bsp_tree_test.cpp 2009-12-16 19:45:23 UTC (rev 3416)
@@ -1963,7 +1963,7 @@
ptr = &tmp_coords;
}
- size_t pt1, pt2;
+ size_t pt1 = 0, pt2 = 0;
double lsqr = -1;
for (size_t i = 0; i < ptr->size(); ++i) {
for (size_t j = 0; j < ptr->size();++j) {
Modified: MOAB/trunk/test/h5file/h5sets_test.cpp
===================================================================
--- MOAB/trunk/test/h5file/h5sets_test.cpp 2009-12-15 17:55:58 UTC (rev 3415)
+++ MOAB/trunk/test/h5file/h5sets_test.cpp 2009-12-16 19:45:23 UTC (rev 3416)
@@ -14,7 +14,6 @@
void read_write_file( MBInterface& output, MBInterface& input, MBEntityHandle* input_set = 0 )
{
- MBEntityHandle file;
MBErrorCode rval;
rval = output.write_file( filename );
CHECK_ERR(rval);
More information about the moab-dev
mailing list