[MOAB-dev] r5946 - in MOAB/trunk: src/lotte src/moab/point_locater/lotte tools/mbcoupler

vijaysm at mcs.anl.gov vijaysm at mcs.anl.gov
Mon Jan 21 04:57:57 CST 2013


Author: vijaysm
Date: 2013-01-21 04:57:56 -0600 (Mon, 21 Jan 2013)
New Revision: 5946

Modified:
   MOAB/trunk/src/lotte/findpt.c
   MOAB/trunk/src/lotte/poly.c
   MOAB/trunk/src/moab/point_locater/lotte/extrafindpt.h
   MOAB/trunk/src/moab/point_locater/lotte/poly.h
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
   MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
   MOAB/trunk/tools/mbcoupler/ElemUtil.hpp
   MOAB/trunk/tools/mbcoupler/ssn_test.cpp
Log:
Miscellaneous changes to remove some dangerous -WShadow warnings and other harmless unused variable 
warnings with GNU 4.6.

-- Other changes include a minor refactor of the lotte/* sources in an effort to understand 
what needs to be removed going forward if ElemUtil functionality is to be merged. 
-- Also, removing static for routines that did not need them and consequently fixing warnings 
due to [-Wunused-function].



Modified: MOAB/trunk/src/lotte/findpt.c
===================================================================
--- MOAB/trunk/src/lotte/findpt.c	2013-01-21 08:54:53 UTC (rev 5945)
+++ MOAB/trunk/src/lotte/findpt.c	2013-01-21 10:57:56 UTC (rev 5946)
@@ -492,31 +492,36 @@
   real x[3], A[9], axis_bnd[6];
 } obbox_3;
 
-static int obbox_axis_test_2(const obbox_2 *p, const real x[2])
+int obbox_axis_test_2(const obbox_2 *p, const real x[2])
 {
   return (x[0]<p->axis_bnd[0] || x[0]>p->axis_bnd[1] ||
           x[1]<p->axis_bnd[2] || x[1]>p->axis_bnd[3]);
 }
 
-static int obbox_axis_test_3(const obbox_3 *p, const real x[3])
+int obbox_axis_test_3(const obbox_3 *p, const real x[3])
 {
   return (x[0]<p->axis_bnd[0] || x[0]>p->axis_bnd[1] ||
           x[1]<p->axis_bnd[2] || x[1]>p->axis_bnd[3] ||
           x[2]<p->axis_bnd[4] || x[2]>p->axis_bnd[5]);
 }
 
-static int obbox_test_2(const obbox_2 *p, const real x[2], real r[2])
+int obbox_test_2(const obbox_2 *p, const real x[2], real r[2])
 {
-  const real xt[2] = {x[0]-p->x[0],x[1]-p->x[1]};
+  real xt[2] ;
+  xt[0] = x[0]-p->x[0];
+  xt[1] = x[1]-p->x[1];
   r[0] = p->A[0]*xt[0] + p->A[1]*xt[1];
   if(fabsr(r[0])>1) return 1;
   r[1] = p->A[2]*xt[0] + p->A[3]*xt[1];
   return fabsr(r[1])>1;
 }
 
-static int obbox_test_3(const obbox_3 *p, const real x[3], real r[3])
+int obbox_test_3(const obbox_3 *p, const real x[3], real r[3])
 {
-  const real xt[3] = {x[0]-p->x[0],x[1]-p->x[1],x[2]-p->x[2]};
+  real xt[3] ;
+  xt[0] = x[0]-p->x[0];
+  xt[1] = x[1]-p->x[1];
+  xt[2] = x[2]-p->x[2];
   r[0] = p->A[0]*xt[0] + p->A[1]*xt[1] + p->A[2]*xt[2];
   if(fabsr(r[0])>1) return 1;
   r[1] = p->A[3]*xt[0] + p->A[4]*xt[1] + p->A[5]*xt[2];
@@ -525,7 +530,7 @@
   return fabsr(r[2])>1;
 }
 


More information about the moab-dev mailing list