<div class="gmail_quote">On Wed, Apr 27, 2011 at 18:41, Xiangdong Liang <span dir="ltr">&lt;<a href="mailto:xdliang@gmail.com">xdliang@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks a lot, Jed. I am using Petsc&#39;s built-in function, VecCreate and MatCreate. they are supposed to return PetscErrorCode. However, I still get &quot;warning: return makes pointer from integer without a cast&quot; for these built-in functions.  </blockquote>
</div><br><div>There is a &quot;return&quot; inside the CHKERRQ macro. You either need to make *your* function return PetscErrorCode or use a different checking macro (e.g. CHKERRABORT).</div>