Unidata / UDUNITS-2

API and utility for arithmetic manipulation of units of physical quantities
http://www.unidata.ucar.edu/software/udunits
Other
62 stars 36 forks source link

Static Analysis #14

Closed WardF closed 10 years ago

WardF commented 10 years ago

Trying to figure out pull requests on Github, and thought I'd do a modicum of good at the same time. Grabbed udunits, ran clang/llvm-based static analysis on it and fixed a couple of minor issues reported. Plus an issue I introduced when fixing one of the issues. That's what unit tests are for, right?

WardF commented 10 years ago

Excellent, my first pull request accepted.

semmerson commented 10 years ago

Ward,

Looks like GitHub closed the pull-request. The pull-request webpage changed immediately when I did the "git push".

Regards, Steve Emmerson

On Mon, Jun 16, 2014 at 11:08 AM, Ward Fisher notifications@github.com wrote:

Trying to figure out pull requests on Github, and thought I'd do a modicum of good at the same time. Grabbed udunits, ran clang/llvm-based static analysis on it and fixed a couple of minor issues reported. Plus an issue I introduced when fixing one of the issues. That's what unit tests are for,

right?

You can merge this Pull Request by running

git pull https://github.com/WardF/UDUNITS-2 master

Or view, comment on, or merge it at:

https://github.com/Unidata/UDUNITS-2/pull/14 Commit Summary

  • Corrected a NULL pointer dereference that logic dictates would never happen, but now it is guarded against. clang-based static analysis was used to identify this issue.
  • Fixed a static-analysis identified issue where malloc was called to allocate 0 bytes. This may cause a problem on some systems.
  • Addressed a bug I introduced when fixing a previous one.

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/Unidata/UDUNITS-2/pull/14.

semmerson commented 10 years ago

Don't get cocky. :-)

On 6/16/2014 1:37 PM, Ward Fisher wrote:

Excellent, my first pull request accepted.

— Reply to this email directly or view it on GitHub https://github.com/Unidata/UDUNITS-2/pull/14#issuecomment-46224582.