On Mon, Mar 19, 2012 at 10:23 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">On Mon, Mar 19, 2012 at 09:59, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ctetgen.c:10050:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]<br>

ctetgen.c:10070:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]<br></blockquote><div><br></div></div><div>I can't change this, since this is what the package does. I guess they get away with it now.</div>

</blockquote></div><br><div>It's a normal int, not a PetscInt, so at least it will always fit in that pointer variable.</div><div><br></div><div>You can silence the warning by changing the line from</div><div><br></div>

<div>    leftarray[0] = (point) i; // The array length.</div><div><br></div><div>to</div><div><br></div><div>    leftarray[0] = (point) (PETSC_UINTPTR_T)i; // The array length.</div></blockquote><div><br></div><div>Oh, I see now. Fixed.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Note that every // comment needs to be fixed. There are still a number of Wunused-but-set-variable</div>
</blockquote><div><br></div><div>Yes, I was waiting on the comments. That will be a ton of mindless work.</div><div><br></div><div>I know about the unused stuff. I was reluctant to remove a bunch of these statement so that I could</div>
<div>remain statement compatible with TetGen for debugging purposes. I can comment them out.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c: In function ‘TetGenMeshBTreeSort’:</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:10050:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:10070:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c: In function ‘TetGenMeshFindDirection2’:</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:13153:49: warning: variable ‘cop’ set but not used [-Wunused-but-set-variable]</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c: In function ‘TetGenMeshConstrainedFacets’:</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:15042:22: warning: variable ‘delaunayflag’ set but not used [-Wunused-but-set-variable]</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c: In function ‘TetGenMeshConstrainedFacets2’:</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:15340:22: warning: variable ‘delaunayflag’ set but not used [-Wunused-but-set-variable]</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c: In function ‘TetGenMeshRepairEncSubs’:</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:18617:8: warning: variable ‘oldptnum’ set but not used [-Wunused-but-set-variable]</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c: In function ‘TetGenMeshOptimize’:</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:19734:18: warning: variable ‘maxdihed’ set but not used [-Wunused-but-set-variable]</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c: At top level:</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:2026:23: warning: ‘ListHasItem’ defined but not used [-Wunused-function]</font></div></div><div><br></div><div><br></div><div>

And the complex/int64 build is broken:</div><div><br></div><div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:4047:36: error: assigning to 'PetscReal' (aka 'double') from incompatible type 'PetscScalar' (aka 'complex<double>');</font></div>

<div><font face="'courier new', monospace">        in->pointlist[idx*dim + d] = array[off+d];</font></div><div><font face="'courier new', monospace">                                   ^ ~~~~~~~~~~~~</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:4049:14: error: no matching function for call to 'DMComplexGetLabelValue'</font></div><div><font face="'courier new', monospace">      ierr = DMComplexGetLabelValue(boundary, "marker", v, &in->pointmarkerlist[idx]);CHKERRQ(ierr);</font></div>

<div><font face="'courier new', monospace">             ^~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:1821:16: note: candidate function not viable: no known conversion from 'int *' to 'PetscInt *' (aka 'long long *') for 4th argument;</font></div>

<div><font face="'courier new', monospace">PetscErrorCode DMComplexGetLabelValue(DM dm, const char name[], PetscInt point, PetscInt *value)</font></div><div><font face="'courier new', monospace">               ^</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:4082:14: error: no matching function for call to 'DMComplexGetLabelValue'</font></div><div><font face="'courier new', monospace">      ierr = DMComplexGetLabelValue(boundary, "marker", f, &in->facetmarkerlist[idx]);CHKERRQ(ierr);</font></div>

<div><font face="'courier new', monospace">             ^~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:1821:16: note: candidate function not viable: no known conversion from 'int *' to 'PetscInt *' (aka 'long long *') for 4th argument;</font></div>

<div><font face="'courier new', monospace">PetscErrorCode DMComplexGetLabelValue(DM dm, const char name[], PetscInt point, PetscInt *value)</font></div><div><font face="'courier new', monospace">               ^</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:4300:36: error: assigning to 'PetscReal' (aka 'double') from incompatible type 'PetscScalar' (aka 'complex<double>');</font></div>

<div><font face="'courier new', monospace">        in->pointlist[idx*dim + d] = array[off+d];</font></div><div><font face="'courier new', monospace">                                   ^ ~~~~~~~~~~~~</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:4302:14: error: no matching function for call to 'DMComplexGetLabelValue'</font></div><div><font face="'courier new', monospace">      ierr = DMComplexGetLabelValue(dm, "marker", v, &in->pointmarkerlist[idx]);CHKERRQ(ierr);</font></div>

<div><font face="'courier new', monospace">             ^~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/complex.c:1821:16: note: candidate function not viable: no known conversion from 'int *' to 'PetscInt *' (aka 'long long *') for 4th argument;</font></div>

<div><font face="'courier new', monospace">PetscErrorCode DMComplexGetLabelValue(DM dm, const char name[], PetscInt point, PetscInt *value)</font></div><div><font face="'courier new', monospace">               ^</font></div>

<div><font face="'courier new', monospace">5 errors generated.</font></div><div><font face="'courier new', monospace">make[2]: *** [CMakeFiles/petsc.dir/src/dm/impls/complex/complex.c.o] Error 1</font></div>

<div><font face="'courier new', monospace">make[2]: *** Waiting for unfinished jobs....</font></div><div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:14202:26: warning: if statement has empty body [-Wempty-body]</font></div>

<div><font face="'courier new', monospace">      if (!crossface.tet); {SETERRQ(PETSC_COMM_SELF, PETSC_ERR_PLIB, "Not handled yet");}</font></div><div><font face="'courier new', monospace">                         ^</font></div>

<div><font face="'courier new', monospace">/home/jed/petsc/src/dm/impls/complex/ctetgen.c:2026:23: warning: unused function 'ListHasItem' [-Wunused-function]</font></div><div><font face="'courier new', monospace">static PetscErrorCode ListHasItem(List *l, void *checkitem, int *idx)</font></div>
</div>
</blockquote></div><br>I will fix this somehow.<div><br></div><div>   Matt<br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div>