[petsc-dev] Pushing non-working code

Matthew Knepley knepley at gmail.com
Sat Feb 2 16:14:54 CST 2013


I think non-working is a misnomer here. These do not break the build.

    Matt
On Feb 2, 2013 4:23 PM, "Jed Brown" <jedbrown at mcs.anl.gov> wrote:

> It seems like every time I pull PETSc, I get more build noise from unused
> or uninitialized variables. I have a suggestion: if it's not clean yet,
> just don't push it. If you want a backup or to communicate the messy code
> with someone else, push it to bitbucket.org/YOURNAME/petsc-dev. Pushing
> to petsc-dev should mean that it's either ready for users or that it's at
> least ready for other people to start working with.
>
> Pushing obviously broken code to petsc-dev discourages people from reading
> the commit logs because it's exhausting and it's hard to argue with "yeah,
> I know none of that works" (except to fix the process). Lack of review
> lowers the quality of code in PETSc.
>
>
> It's Matt's code today, but we've all been guilty on occasion.
>
> /home/jed/petsc/src/dm/impls/plex/plex.c:10062:19: warning: unused
> variable 'numSubPoints' [-Wunused-variable]
>   PetscInt       *numSubPoints, *coneNew;
>                   ^
> /home/jed/petsc/src/dm/impls/plex/plex.c[ 68%] :10209:7: warning: variable
> 'coneNew' is uninitialized when used here [-Wuninitialized]
>       coneNew[c] = firstSubVertex + subvertex;
>       ^~~~~~~
> /home/jed/petsc/src/dm/impls/plex/plex.c:10062:41: note: initialize the
> variable 'coneNew' to silence this warning
>   PetscInt       *numSubPoints, *coneNew;
>                                         ^
>                                          = NULL
> /home/jed/petsc/src/dm/impls/plex/plex.c:10280:38: warning: variable
> 'subpointMap' is uninitialized when used here [-Wuninitialized]
>   ierr = DMPlexSetSubpointMap(subdm, subpointMap);CHKERRQ(ierr);
>                                      ^~~~~~~~~~~
> /home/jed/petsc/src/dm/impls/plex/plex.c:10060:76: note: initialize the
> variable 'subpointMap' to silence this warning
>   IS              subvertexIS, subedgeIS, subfaceIS, subcellIS,
> subpointMap;
>
>  ^
>
>   = NULL
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130202/a155a821/attachment.html>


More information about the petsc-dev mailing list