[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. 5061ba991cc8c064173ee773b9606187ae
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: malat <ma...@us...> - 2023-05-02 09:13:25
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grassroots DICOM".
The branch, release has been updated
via 5061ba991cc8c064173ee773b9606187aed3badd (commit)
via 03b531659dc9069a779fa911d4e6a49612ffe681 (commit)
from 2ef6054c83c212fa177547a71912390c65330e8f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/gdcm/gdcm/ci/5061ba991cc8c064173ee773b9606187aed3badd/
commit 5061ba991cc8c064173ee773b9606187aed3badd
Author: Sean McBride <se...@ro...>
Date: Tue Apr 4 22:38:12 2023 -0400
Manually fixed all clang-tidy clang-analyzer-unix.Malloc warnings
It identified one missing free(), but I noticed it's also missing in the other early returns.
diff --git a/.clang-tidy b/.clang-tidy
index 9d6b66bbc..da5ab0e39 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -47,7 +47,6 @@ Checks: '-*,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-unix.cstring.NullArg,
-clang-analyzer-optin.performance.Padding,
- -clang-analyzer-unix.Malloc,
-clang-analyzer-core.uninitialized.Assign,
-clang-analyzer-security.insecureAPI.rand,
-clang-analyzer-security.insecureAPI.strcpy,
diff --git a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
index c8645a27f..f1530d175 100644
--- a/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx
@@ -1260,6 +1260,7 @@ bool JPEG2000Codec::CodeFrameIntoBuffer(char * outdata, size_t outlen, size_t &
image_width, image_height,
sample_pixel, bitsallocated, bitsstored, highbit, sign, quality, this->GetPlanarConfiguration() );
if (!image) {
+ free(parameters.cp_comment);
return false;
}
@@ -1288,6 +1289,7 @@ bool JPEG2000Codec::CodeFrameIntoBuffer(char * outdata, size_t outlen, size_t &
cio = opj_stream_create_memory_stream(fsrc,OPJ_J2K_STREAM_CHUNK_SIZE,false);
if (! cio)
{
+ free(parameters.cp_comment);
return false;
}
/* encode the image */
@@ -1301,6 +1303,7 @@ bool JPEG2000Codec::CodeFrameIntoBuffer(char * outdata, size_t outlen, size_t &
if (!bSuccess)
{
opj_stream_destroy(cio);
+ free(parameters.cp_comment);
return false;
}
codestream_length = mysrc.len;
@@ -1309,6 +1312,7 @@ bool JPEG2000Codec::CodeFrameIntoBuffer(char * outdata, size_t outlen, size_t &
//f = fopen(parameters.outfile, "wb");
//if (!f) {
// fprintf(stderr, "failed to open %s for writing\n", parameters.outfile);
+ // free(parameters.cp_comment);
// return 1;
//}
//fwrite(cio->buffer, 1, codestream_length, f);
diff --git a/Utilities/.clang-tidy b/Utilities/.clang-tidy
index 8baac2daf..acc2f5795 100644
--- a/Utilities/.clang-tidy
+++ b/Utilities/.clang-tidy
@@ -56,7 +56,6 @@ Checks: '-*,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-unix.cstring.NullArg,
-clang-analyzer-optin.performance.Padding,
- -clang-analyzer-unix.Malloc,
-clang-analyzer-core.uninitialized.Assign,
-clang-analyzer-security.insecureAPI.rand,
-clang-analyzer-security.insecureAPI.strcpy,
https://sourceforge.net/p/gdcm/gdcm/ci/03b531659dc9069a779fa911d4e6a49612ffe681/
commit 03b531659dc9069a779fa911d4e6a49612ffe681
Author: Sean McBride <se...@ro...>
Date: Tue Apr 4 22:50:05 2023 -0400
Auto-fixed one clang-tidy hicpp-use-equals-default warning
diff --git a/Source/MessageExchangeDefinition/gdcmBaseRootQuery.cxx b/Source/MessageExchangeDefinition/gdcmBaseRootQuery.cxx
index 84b9c52a1..9cd61a45c 100644
--- a/Source/MessageExchangeDefinition/gdcmBaseRootQuery.cxx
+++ b/Source/MessageExchangeDefinition/gdcmBaseRootQuery.cxx
@@ -53,10 +53,6 @@ namespace gdcm
{
//nothing to do, really
}
- BaseRootQuery::~BaseRootQuery()
- {
- //nothing to do, really
- }
static const char *QueryLevelStrings[] = {
"PATIENT ",
diff --git a/Source/MessageExchangeDefinition/gdcmBaseRootQuery.h b/Source/MessageExchangeDefinition/gdcmBaseRootQuery.h
index 4c16a8434..b7d9bb796 100644
--- a/Source/MessageExchangeDefinition/gdcmBaseRootQuery.h
+++ b/Source/MessageExchangeDefinition/gdcmBaseRootQuery.h
@@ -80,7 +80,7 @@ protected:
std::string mHelpDescription; //used when generating the help output
public:
- ~BaseRootQuery() override;
+ ~BaseRootQuery() override = default;
///this function will return all tags at a given query level, so that
///they maybe selected for searching. The boolean forFind is true
-----------------------------------------------------------------------
Summary of changes:
.clang-tidy | 1 -
Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx | 4 ++++
Source/MessageExchangeDefinition/gdcmBaseRootQuery.cxx | 4 ----
Source/MessageExchangeDefinition/gdcmBaseRootQuery.h | 2 +-
Utilities/.clang-tidy | 1 -
5 files changed, 5 insertions(+), 7 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|