Skip to content

Commit

Permalink
this was worse than before
Browse files Browse the repository at this point in the history
  • Loading branch information
jwijffels committed Sep 14, 2023
1 parent 79ae159 commit 6740c7d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 0 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- Remove CITATION file
- Minor cosmetic changes to remove some Pedantic compiler messages in rcpp_crfsuite.cpp and crfsuite.h
- Comment out rumavl_strerror in rumavl.h as the function is not used and in order to avoid 'warning: function declaration isn't a prototype [-Wstrict-prototypes]'
- Fix in mem_mgr of ramvl.c caused by update of valgrind 3.21.0 which is now flagging 'realloc with size 0' in packages

# CHANGES IN crfsuite VERSION 0.4.1

Expand Down
14 changes: 1 addition & 13 deletions src/crf/src/rumavl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,17 +1105,5 @@ static void *mem_mgr (RUMAVL *tree, void *ptr, size_t size)
if (tree->alloc != NULL)
return tree->alloc(ptr, size, tree->udata);

//return realloc(ptr, size);
/* FIX CRAN warning START
The valgrind 'additional issue' checks are now being done with Fedora 38
and its valgrind 3.21.0. This is flagging 'realloc with size 0' in packages
*/
if (size <= 0) {
free(ptr);
ptr = NULL;
return(ptr);
}else {
return realloc(ptr, size);
}
/* FIX CRAN warning END */
return realloc(ptr, size);
}

0 comments on commit 6740c7d

Please sign in to comment.