Skip to content

Commit fb7e870

Browse files
committed
Fixed: clang warnings
1 parent d823eda commit fb7e870

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

Codecs/CodecGif/Source/CodecGif.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,14 @@ namespace IMCodec
247247
imageItem->descriptor.rowPitchInBytes = IMCodec::GetTexelFormatSize(imageItem->descriptor.texelFormatDecompressed) * imageItem->descriptor.width / CHAR_BIT;
248248
imageItem->data = std::move(frameBuffers.at(imageIndex));
249249
imageItem->animationData.delayMilliseconds = currentFrameData.gcb.DelayTime * 10; // multiply by 10 to convert centiseconds to milliseconds.
250-
imageItem->processData.pluginUsed = GetPluginProperties().id;
251-
250+
252251
//Estimation on frame loading time, since frame are loaded together is a bit cumbersome to precisly time the 'load time'
253252

254253
if (loadTIme == -1)
255254
{
256255
using namespace LLUtils;
257256
loadTIme = static_cast<double>(stopWatch.GetElapsedTimeReal(StopWatch::TimeUnit::Milliseconds));
258257
}
259-
260-
imageItem->processData.processTime = loadTIme;
261258

262259
if (isMultiImage)
263260
out_image->SetSubImage(imageIndex, std::make_shared<Image>(imageItem, ImageItemType::Unknown));

Codecs/CodecTiff/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ add_subdirectory(${LibTiffFolder} ./external/libtiff)
2323
if (IMCODEC_DISABLE_WARNINGS_EXTERNAL_LIBS)
2424
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
2525
target_compile_options(tiff PRIVATE
26+
-Wno-extra-semi
27+
-Wno-declaration-after-statement
28+
-Wno-format
2629
-Wno-nonportable-system-include-path
2730
-Wno-cast-align
2831
-Wno-strict-prototypes
@@ -54,6 +57,13 @@ if (IMCODEC_DISABLE_WARNINGS_EXTERNAL_LIBS)
5457
-Wno-switch-default
5558
)
5659

60+
target_compile_options(tiff_port PRIVATE
61+
-Wno-missing-variable-declarations
62+
-Wno-unsafe-buffer-usage
63+
-Wno-reserved-macro-identifier
64+
-Wno-undef
65+
)
66+
5767
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
5868
target_compile_options(tiff PRIVATE -Wno-array-parameter -Wno-misleading-indentation)
5969
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")

Codecs/CodecTiff/Source/CodecTiff.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace IMCodec
4242
return mPluginProperties;
4343
}
4444

45-
TexelFormat GetTexelFormat(uint16_t sampleFormat, uint16 bitsPerSample, uint16_t samplesPerPixel, uint16_t photoMetric) const
45+
TexelFormat GetTexelFormat(uint16_t sampleFormat, uint16_t bitsPerSample, uint16_t samplesPerPixel, uint16_t photoMetric) const
4646
{
4747
TexelFormat texelFormat = TexelFormat::UNKNOWN;
4848

@@ -168,11 +168,11 @@ namespace IMCodec
168168

169169
uint16_t sampleFormat{};
170170

171-
uint32 width, height{};
172-
uint16 bitsPerSample{};
171+
uint32_t width, height{};
172+
uint16_t bitsPerSample{};
173173
//uint16 compression{};
174-
uint16 photoMetric{};
175-
uint16 samplesPerPixel{};
174+
uint16_t photoMetric{};
175+
uint16_t samplesPerPixel{};
176176
uint16_t orientation{};
177177
uint32_t rowPitch{};
178178
//uint32 rowsPerStrip{};
@@ -248,7 +248,7 @@ namespace IMCodec
248248
//override target row pitch - always 32bpp
249249
imageItem->descriptor.rowPitchInBytes = width * 4;
250250
imageItem->data.Allocate(height * imageItem->descriptor.rowPitchInBytes);
251-
TIFFReadRGBAImageOriented(tiff, width, height, reinterpret_cast<uint32*>(imageItem->data.data()), orientation);
251+
TIFFReadRGBAImageOriented(tiff, width, height, reinterpret_cast<uint32_t*>(imageItem->data.data()), orientation);
252252
}
253253

254254

0 commit comments

Comments
 (0)