Skip to content

Commit

Permalink
errors: update static analysis tools for giterr
Browse files Browse the repository at this point in the history
Update GITERR and giterr usages in the static code analysis tools to use
the new names.
  • Loading branch information
ethomson committed Jan 22, 2019
1 parent fcc7dcb commit 00c66df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions libgit2_clar.supp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
}

{
ignore-giterr-set-leak
ignore-giterror-set-leak
Memcheck:Leak
...
fun:giterr_set
fun:giterror_set
}

{
Expand Down
6 changes: 3 additions & 3 deletions script/user_nodefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/

#nodef GITERR_CHECK_ALLOC(ptr) if (ptr == NULL) { __coverity_panic__(); }
#nodef GITERR_CHECK_ALLOC_BUF(buf) if (buf == NULL || git_buf_oom(buf)) { __coverity_panic__(); }
#nodef GIT_ERROR_CHECK_ALLOC(ptr) if (ptr == NULL) { __coverity_panic__(); }
#nodef GIT_ERROR_CHECK_ALLOC_BUF(buf) if (buf == NULL || git_buf_oom(buf)) { __coverity_panic__(); }

#nodef GITERR_CHECK_ALLOC_ADD(out, one, two) \
if (GIT_ADD_SIZET_OVERFLOW(out, one, two)) { __coverity_panic__(); }
Expand All @@ -23,7 +23,7 @@
#nodef GITERR_CHECK_ALLOC_MULTIPLY(out, nelem, elsize) \
if (GIT_MULTIPLY_SIZET_OVERFLOW(out, nelem, elsize)) { __coverity_panic__(); }

#nodef GITERR_CHECK_VERSION(S,V,N) if (giterr__check_version(S,V,N) < 0) { __coverity_panic__(); }
#nodef GIT_ERROR_CHECK_VERSION(S,V,N) if (git_error__check_version(S,V,N) < 0) { __coverity_panic__(); }

#nodef LOOKS_LIKE_DRIVE_PREFIX(S) (strlen(S) >= 2 && git__isalpha((S)[0]) && (S)[1] == ':')

Expand Down

0 comments on commit 00c66df

Please sign in to comment.