[cgma-dev] r5553 - cgm/trunk/itaps

jvporter at wisc.edu jvporter at wisc.edu
Thu Jun 7 16:12:13 CDT 2012


Author: jvporter
Date: 2012-06-07 16:12:13 -0500 (Thu, 07 Jun 2012)
New Revision: 5553

Modified:
   cgm/trunk/itaps/iGeom_CGMA.cc
Log:
Fix warnings in CUBIT build:
* Remove unused code
* Ensure fread reads the correct number of bytes


Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc	2012-06-07 14:45:53 UTC (rev 5552)
+++ cgm/trunk/itaps/iGeom_CGMA.cc	2012-06-07 21:12:13 UTC (rev 5553)
@@ -226,10 +226,6 @@
                                 double pt,
                                 double& tmin,
                                 double& tmax );
-static bool
-iBase_intersect_ray_box( const CubitBox& box,
-                         const CubitVector& point,
-                         const CubitVector& direction );
 
 static CubitStatus
 iGeom_fire_ray( const CubitVector& point,
@@ -289,20 +285,6 @@
                             DLIList<RefEntity*>& target_list,
                             int* err );
 
-static
-CubitStatus iGeom_get_graphics(RefFace* face, 
-                               DLIList<CubitVector*>& point_list,
-                               DLIList<int>& facet_list,
-                               unsigned short normal_tolerance = 15,
-                               double distance_tolerance = 0,
-                               double longest_edge = 0) ;
-
-static
-CubitStatus iGeom_get_graphics(RefEdge* edge,
-                               DLIList<CubitVector*>& point_list,
-                               DLIList<int>& facet_list,
-                               double tolerance = 0.0 ) ;
-
 static CubitStatus init_cgm( const std::string& engine )
 {
   CubitStatus status;
@@ -6572,6 +6554,7 @@
 void
 iGeom_load_cub_geometry(const char *name, int* err) 
 {
+  size_t bytes_read;
   FILE *cubfile = fopen(name, "rb");
   if (NULL == cubfile) RETURN(iBase_FILE_NOT_FOUND);
 
@@ -6585,7 +6568,10 @@
   long endpos = ftell(cubfile);
   
   char magic_str[4] = {'\0', '\0', '\0', '\0'};
-  fread(magic_str, 1, 4, cubfile);
+  bytes_read = fread(magic_str, 1, 4, cubfile);
+  if (bytes_read != 4) {


More information about the cgma-dev mailing list