[MOAB-dev] r3958 - MOAB/trunk/src/io

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue May 25 14:58:15 CDT 2010


Author: kraftche
Date: 2010-05-25 14:58:15 -0500 (Tue, 25 May 2010)
New Revision: 3958

Modified:
   MOAB/trunk/src/io/ReadHDF5.cpp
   MOAB/trunk/src/io/WriteHDF5.cpp
Log:
fix some warnings

Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2010-05-25 19:31:43 UTC (rev 3957)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2010-05-25 19:58:15 UTC (rev 3958)
@@ -303,14 +303,14 @@
       // first check if file exists, so we can fail w/out
       // a lot of noise from the HDF5 library if it does not
 #if !defined(WIN32) && !defined(WIN64)
-    struct stat junk;
-    if (stat( filename, &junk)) {
+    struct stat stat_info;
+    if (stat( filename, &stat_info)) {
       if (ENOENT == errno)
         return MB_FILE_DOES_NOT_EXIST;
       else
         return MB_FILE_WRITE_ERROR;
     }
-    else if (S_ISDIR(junk.st_mode))
+    else if (S_ISDIR(stat_info.st_mode))
       return MB_FILE_DOES_NOT_EXIST;
 #endif
   
@@ -350,7 +350,6 @@
   mhdf_closeFile( filePtr, &status );
   filePtr = 0;
   return is_error(status) ? MB_FAILURE : MB_SUCCESS;
-    return MB_FAILURE;
 }
 
 ErrorCode ReadHDF5::load_file( const char* filename, 
@@ -400,7 +399,7 @@
   
 
 
-ErrorCode ReadHDF5::load_file_impl( const FileOptions& opts )
+ErrorCode ReadHDF5::load_file_impl( const FileOptions& )
 {
   ErrorCode rval;
   mhdf_Status status;
@@ -1564,7 +1563,7 @@
   
     // read all node-adjacent elements of smaller dimensions
   for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-    EntityType type = CN::EntityTypeFromName( fileInfo->elems[i].type );
+    type = CN::EntityTypeFromName( fileInfo->elems[i].type );
     if (CN::Dimension(type) < max_dim) {
       dbgOut.tprintf(3, "   Reading node-adjacent elements for: %s\n", fileInfo->elems[i].handle);
       rval = read_node_adj_elems( fileInfo->elems[i] );
@@ -2205,14 +2204,14 @@
   ErrorCode rval;
   mhdf_Status status;


More information about the moab-dev mailing list