Skip to content

Commit b9c0369

Browse files
author
Grok Compression
committed
clang: fix a few warnings
1 parent eb575af commit b9c0369

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/lib/codec/formats/PNGFormat.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ class PNGFormat : public ImageFormat
5959

6060
static bool pngWarningHandlerVerbose = true;
6161

62-
static void png_warning_fn([[maybe_unused]] png_structp png_ptr, png_const_charp warning_message)
62+
static inline void png_warning_fn([[maybe_unused]] png_structp png_ptr,
63+
png_const_charp warning_message)
6364
{
6465
if(pngWarningHandlerVerbose)
6566
spdlog::warn("libpng: {}", warning_message);
6667
}
6768

68-
static void png_error_fn([[maybe_unused]] png_structp png_ptr, png_const_charp error_message)
69+
static inline void png_error_fn([[maybe_unused]] png_structp png_ptr, png_const_charp error_message)
6970
{
7071
spdlog::error("libpng: {}", error_message);
7172
}

src/lib/codec/formats/TIFFFormat.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ class TIFFFormat : public ImageFormat
8888

8989
#ifdef GRK_CUSTOM_TIFF_IO
9090

91-
static tmsize_t TiffRead([[maybe_unused]] thandle_t handle, [[maybe_unused]] void* buf,
92-
tmsize_t size)
91+
static inline tmsize_t TiffRead([[maybe_unused]] thandle_t handle, [[maybe_unused]] void* buf,
92+
tmsize_t size)
9393
{
9494
return size;
9595
}
96-
static tmsize_t TiffWrite(thandle_t handle, void* buf, tmsize_t size)
96+
static inline tmsize_t TiffWrite(thandle_t handle, void* buf, tmsize_t size)
9797
{
9898
auto* serializer = static_cast<FileOrchestratorIO*>(handle);
9999
const size_t bytes_total = (size_t)size;
@@ -109,7 +109,7 @@ static tmsize_t TiffWrite(thandle_t handle, void* buf, tmsize_t size)
109109
return (tmsize_t)-1;
110110
}
111111

112-
static uint64_t TiffSeek(thandle_t handle, uint64_t off, int32_t whence)
112+
static inline uint64_t TiffSeek(thandle_t handle, uint64_t off, int32_t whence)
113113
{
114114
auto* serializer = static_cast<FileOrchestratorIO*>(handle);
115115
_TIFF_off_t off_io = (_TIFF_off_t)off;
@@ -123,14 +123,14 @@ static uint64_t TiffSeek(thandle_t handle, uint64_t off, int32_t whence)
123123
return serializer->seek((int64_t)off, whence);
124124
}
125125

126-
static int TiffClose(thandle_t handle)
126+
static inline int TiffClose(thandle_t handle)
127127
{
128128
auto* serializer = static_cast<FileOrchestratorIO*>(handle);
129129

130130
return serializer->close() ? 0 : EINVAL;
131131
}
132132

133-
static uint64_t TiffSize([[maybe_unused]] thandle_t handle)
133+
static inline uint64_t TiffSize([[maybe_unused]] thandle_t handle)
134134
{
135135
return 0U;
136136
}
@@ -606,7 +606,7 @@ bool TIFFFormat<T>::encodeFinish(void)
606606

607607
////////////////////////////////////////////////////////////////////////////////////////////////
608608

609-
static std::string getSampleFormatString(uint16_t tiSampleFormat)
609+
static inline std::string getSampleFormatString(uint16_t tiSampleFormat)
610610
{
611611
switch(tiSampleFormat)
612612
{
@@ -633,7 +633,7 @@ static std::string getSampleFormatString(uint16_t tiSampleFormat)
633633
}
634634
}
635635

636-
static std::string getColourFormatString(uint16_t tiPhoto)
636+
static inline std::string getColourFormatString(uint16_t tiPhoto)
637637
{
638638
switch(tiPhoto)
639639
{
@@ -681,7 +681,7 @@ static std::string getColourFormatString(uint16_t tiPhoto)
681681
}
682682
}
683683

684-
static void set_resolution(double* res, float resx, float resy, short resUnit)
684+
static inline void set_resolution(double* res, float resx, float resy, short resUnit)
685685
{
686686
// resolution is in pels / metre
687687
res[0] = resx;

0 commit comments

Comments
 (0)