Skip to content

Commit

Permalink
Fixed minor warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Eichelberg committed Jun 9, 2021
1 parent 837f2f7 commit 9c69ded
Show file tree
Hide file tree
Showing 18 changed files with 145 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CMake/dcmtkPrepare.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ if(WIN32) # special handling for Windows systems
-D_CRT_VCCLRIT_NO_DEPRECATE
-D_SCL_SECURE_NO_DEPRECATE
)
# suppress linker warning LNK4099 about missing .pdb files when compiling in debug mode
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099")
endif()
# Enable various warnings
endif()
Expand Down
8 changes: 7 additions & 1 deletion dcmdata/libsrc/vrscan.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2010-2018, OFFIS e.V.
* Copyright (C) 2010-2021, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
Expand All @@ -26,12 +26,16 @@
#include "dcmtk/ofstd/ofbmanip.h"
#include "dcmtk/ofstd/ofstd.h" /* For OFString::strerror() */
#include "dcmtk/dcmdata/dctypes.h" /* For DCMDATA_WARN() */
#include "dcmtk/ofstd/ofdiag.h"

BEGIN_EXTERN_C
#include "vrscani.h"
#include "vrscanl.h"
END_EXTERN_C

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

int vrscan::scan(const OFString& vr, const char* const value, const size_t size)
{
yyscan_t scanner;
Expand Down Expand Up @@ -74,6 +78,8 @@ int vrscan::scan(const OFString& vr, const char* const value, const size_t size)
return result;
}

#include DCMTK_DIAGNOSTIC_POP

int vrscan::scan(const OFString& vr, const OFString& value)
{
return scan(vr, value.data(), value.size());
Expand Down
7 changes: 6 additions & 1 deletion dcmimage/libsrc/dipipng.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2003-2019, OFFIS e.V.
* Copyright (C) 2003-2021, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
Expand Down Expand Up @@ -28,6 +28,7 @@
#include "dcmtk/dcmimgle/diimage.h"
#include "dcmtk/dcmimage/dipipng.h"
#include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version */
#include "dcmtk/ofstd/ofdiag.h"

BEGIN_EXTERN_C
#ifdef HAVE_LIBPNG_PNG_H
Expand All @@ -51,6 +52,8 @@ DiPNGPlugin::~DiPNGPlugin()
{
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

int DiPNGPlugin::write(
DiImage *image,
Expand Down Expand Up @@ -191,6 +194,8 @@ int DiPNGPlugin::write(
return result;
}

#include DCMTK_DIAGNOSTIC_POP


void DiPNGPlugin::setInterlaceType(DiPNGInterlace itype)
{
Expand Down
10 changes: 10 additions & 0 deletions dcmjpeg/libsrc/dipijpeg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "dcmtk/dcmimgle/diimage.h"
#include "dcmtk/dcmjpeg/dipijpeg.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/ofstd/ofdiag.h"
#include <csetjmp>

BEGIN_EXTERN_C
Expand All @@ -44,6 +45,9 @@ BEGIN_EXTERN_C
using STD_NAMESPACE longjmp;
using STD_NAMESPACE jmp_buf;

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING

// private error handler struct
struct DIEIJG8ErrorStruct
{
Expand All @@ -55,6 +59,8 @@ struct DIEIJG8ErrorStruct
const DiJPEGPlugin *instance;
};

#include DCMTK_DIAGNOSTIC_POP

// callback forward declarations
void DIEIJG8ErrorExit(j_common_ptr);
void DIEIJG8OutputMessage(j_common_ptr cinfo);
Expand Down Expand Up @@ -133,6 +139,8 @@ void DiJPEGPlugin::outputMessage(void *arg) const
}
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

int DiJPEGPlugin::write(DiImage *image,
FILE *stream,
Expand Down Expand Up @@ -235,6 +243,8 @@ int DiJPEGPlugin::write(DiImage *image,
return result;
}

#include DCMTK_DIAGNOSTIC_POP


OFString DiJPEGPlugin::getLibraryVersionString()
{
Expand Down
10 changes: 10 additions & 0 deletions dcmjpeg/libsrc/djdijg12.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "dcmtk/dcmjpeg/djcparam.h"
#include "dcmtk/dcmdata/dcerror.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/ofstd/ofdiag.h"
#include <csetjmp>

// These two macros are re-defined in the IJG header files.
Expand Down Expand Up @@ -51,6 +52,9 @@ BEGIN_EXTERN_C
using STD_NAMESPACE longjmp;
using STD_NAMESPACE jmp_buf;

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING

// private error handler struct
struct DJDIJG12ErrorStruct
{
Expand All @@ -64,6 +68,8 @@ struct DJDIJG12ErrorStruct
DJDecompressIJG12Bit *instance;
};

#include DCMTK_DIAGNOSTIC_POP

// private source manager struct
struct DJDIJG12SourceManagerStruct
{
Expand Down Expand Up @@ -197,6 +203,8 @@ DJDecompressIJG12Bit::~DJDecompressIJG12Bit()
cleanup();
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

OFCondition DJDecompressIJG12Bit::init()
{
Expand Down Expand Up @@ -444,6 +452,8 @@ OFCondition DJDecompressIJG12Bit::decode(
return EC_Normal;
}

#include DCMTK_DIAGNOSTIC_POP

void DJDecompressIJG12Bit::emitMessage(int msg_level) const
{
// This is how we map the message levels:
Expand Down
10 changes: 10 additions & 0 deletions dcmjpeg/libsrc/djdijg16.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "dcmtk/dcmjpeg/djcparam.h"
#include "dcmtk/dcmdata/dcerror.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/ofstd/ofdiag.h"
#include <csetjmp>

// These two macros are re-defined in the IJG header files.
Expand Down Expand Up @@ -51,6 +52,9 @@ BEGIN_EXTERN_C
using STD_NAMESPACE longjmp;
using STD_NAMESPACE jmp_buf;

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING

// private error handler struct
struct DJDIJG16ErrorStruct
{
Expand All @@ -64,6 +68,8 @@ struct DJDIJG16ErrorStruct
DJDecompressIJG16Bit *instance;
};

#include DCMTK_DIAGNOSTIC_POP

// private source manager struct
struct DJDIJG16SourceManagerStruct
{
Expand Down Expand Up @@ -197,6 +203,8 @@ DJDecompressIJG16Bit::~DJDecompressIJG16Bit()
cleanup();
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

OFCondition DJDecompressIJG16Bit::init()
{
Expand Down Expand Up @@ -447,6 +455,8 @@ OFCondition DJDecompressIJG16Bit::decode(
return EC_Normal;
}

#include DCMTK_DIAGNOSTIC_POP

void DJDecompressIJG16Bit::emitMessage(int msg_level) const
{
// This is how we map the message levels:
Expand Down
11 changes: 11 additions & 0 deletions dcmjpeg/libsrc/djdijg8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "dcmtk/dcmjpeg/djcparam.h"
#include "dcmtk/dcmdata/dcerror.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/ofstd/ofdiag.h"
#include <csetjmp>

// These two macros are re-defined in the IJG header files.
Expand Down Expand Up @@ -51,6 +52,10 @@ BEGIN_EXTERN_C
using STD_NAMESPACE longjmp;
using STD_NAMESPACE jmp_buf;

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

// private error handler struct
struct DJDIJG8ErrorStruct
{
Expand All @@ -64,6 +69,8 @@ struct DJDIJG8ErrorStruct
DJDecompressIJG8Bit *instance;
};

#include DCMTK_DIAGNOSTIC_POP

// private source manager struct
struct DJDIJG8SourceManagerStruct
{
Expand Down Expand Up @@ -197,6 +204,8 @@ DJDecompressIJG8Bit::~DJDecompressIJG8Bit()
cleanup();
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

OFCondition DJDecompressIJG8Bit::init()
{
Expand Down Expand Up @@ -444,6 +453,8 @@ OFCondition DJDecompressIJG8Bit::decode(
return EC_Normal;
}

#include DCMTK_DIAGNOSTIC_POP

void DJDecompressIJG8Bit::emitMessage(int msg_level) const
{
// This is how we map the message levels:
Expand Down
11 changes: 11 additions & 0 deletions dcmjpeg/libsrc/djeijg12.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "dcmtk/dcmjpeg/djcparam.h"
#include "dcmtk/dcmdata/dcerror.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/ofstd/ofdiag.h"
#include <csetjmp>

// These two macros are re-defined in the IJG header files.
Expand Down Expand Up @@ -55,6 +56,9 @@ BEGIN_EXTERN_C
using STD_NAMESPACE longjmp;
using STD_NAMESPACE jmp_buf;

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING

// private error handler struct
struct DJEIJG12ErrorStruct
{
Expand All @@ -68,6 +72,8 @@ struct DJEIJG12ErrorStruct
DJCompressIJG12Bit *instance;
};

#include DCMTK_DIAGNOSTIC_POP

// callback forward declarations
void DJEIJG12ErrorExit(j_common_ptr);
void DJEIJG12EmitMessage(j_common_ptr cinfo, int msg_level);
Expand Down Expand Up @@ -331,6 +337,9 @@ OFCondition DJCompressIJG12Bit::encode(
return EC_IllegalCall;
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

OFCondition DJCompressIJG12Bit::encode(
Uint16 columns,
Uint16 rows,
Expand Down Expand Up @@ -483,6 +492,8 @@ OFCondition DJCompressIJG12Bit::encode(
return EC_Normal;
}

#include DCMTK_DIAGNOSTIC_POP

void DJCompressIJG12Bit::initDestination(jpeg_compress_struct *cinfo)
{
cleanup(); // erase old list of compressed blocks, if any
Expand Down
12 changes: 12 additions & 0 deletions dcmjpeg/libsrc/djeijg16.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "dcmtk/dcmjpeg/djcparam.h"
#include "dcmtk/dcmdata/dcerror.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/ofstd/ofdiag.h"
#include <csetjmp>

// These two macros are re-defined in the IJG header files.
Expand Down Expand Up @@ -55,6 +56,10 @@ BEGIN_EXTERN_C
using STD_NAMESPACE longjmp;
using STD_NAMESPACE jmp_buf;

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING

// private error handler struct
struct DJEIJG16ErrorStruct
{
Expand All @@ -68,6 +73,8 @@ struct DJEIJG16ErrorStruct
DJCompressIJG16Bit *instance;
};

#include DCMTK_DIAGNOSTIC_POP

// callback forward declarations
void DJEIJG16ErrorExit(j_common_ptr);
void DJEIJG16EmitMessage(j_common_ptr cinfo, int msg_level);
Expand Down Expand Up @@ -176,6 +183,9 @@ OFCondition DJCompressIJG16Bit::encode(
return EC_IllegalCall;
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

OFCondition DJCompressIJG16Bit::encode(
Uint16 columns,
Uint16 rows,
Expand Down Expand Up @@ -319,6 +329,8 @@ OFCondition DJCompressIJG16Bit::encode(
return EC_Normal;
}

#include DCMTK_DIAGNOSTIC_POP

void DJCompressIJG16Bit::initDestination(jpeg_compress_struct *cinfo)
{
cleanup(); // erase old list of compressed blocks, if any
Expand Down
11 changes: 11 additions & 0 deletions dcmjpeg/libsrc/djeijg8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "dcmtk/dcmjpeg/djcparam.h"
#include "dcmtk/dcmdata/dcerror.h"
#include "dcmtk/ofstd/ofstdinc.h"
#include "dcmtk/ofstd/ofdiag.h"
#include <csetjmp>

// These two macros are re-defined in the IJG header files.
Expand Down Expand Up @@ -55,6 +56,9 @@ BEGIN_EXTERN_C
using STD_NAMESPACE longjmp;
using STD_NAMESPACE jmp_buf;

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING

// private error handler struct
struct DJEIJG8ErrorStruct
{
Expand All @@ -68,6 +72,8 @@ struct DJEIJG8ErrorStruct
DJCompressIJG8Bit *instance;
};

#include DCMTK_DIAGNOSTIC_POP

// callback forward declarations
void DJEIJG8ErrorExit(j_common_ptr);
void DJEIJG8EmitMessage(j_common_ptr cinfo, int msg_level);
Expand Down Expand Up @@ -332,6 +338,9 @@ OFCondition DJCompressIJG8Bit::encode(
return EC_IllegalCall;
}

#include DCMTK_DIAGNOSTIC_PUSH
#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING

OFCondition DJCompressIJG8Bit::encode(
Uint16 columns,
Uint16 rows,
Expand Down Expand Up @@ -485,6 +494,8 @@ OFCondition DJCompressIJG8Bit::encode(
return EC_Normal;
}

#include DCMTK_DIAGNOSTIC_POP

void DJCompressIJG8Bit::initDestination(jpeg_compress_struct *cinfo)
{
cleanup(); // erase old list of compressed blocks, if any
Expand Down
Loading

0 comments on commit 9c69ded

Please sign in to comment.