Skip to content

Commit 0e7b0c2

Browse files
committed
Updated Clang warnings
1 parent b3a1952 commit 0e7b0c2

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

include/private/dsp/arch/generic/bitmap/helpers.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ namespace lsp
4646
{
4747
bitmap_part_t rect;
4848

49-
rect.dst_x = lsp_max(0, x);
50-
rect.dst_y = lsp_max(0, y);
49+
rect.dst_x = lsp_max(ssize_t(0), x);
50+
rect.dst_y = lsp_max(ssize_t(0), y);
5151
rect.src_x = rect.dst_x - x;
5252
rect.src_y = rect.dst_y - y;
5353
rect.count_y = lsp_min(dst->height - rect.dst_y, src->height - rect.src_y);

src/test/ptest/interpolation/linear.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 13 дек. 2020 г.
@@ -103,7 +103,7 @@ PTEST_BEGIN("dsp.interpolation", linear, 5, 10000)
103103
printf("Testing %s numbers...\n", buf);
104104

105105
PTEST_LOOP(buf,
106-
func(a, -1, 0.0f, 3, 0.1f, 1, count);
106+
func(a, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
107107
);
108108
}
109109

@@ -117,7 +117,7 @@ PTEST_BEGIN("dsp.interpolation", linear, 5, 10000)
117117
printf("Testing %s numbers...\n", buf);
118118

119119
PTEST_LOOP(buf,
120-
func(a, b, -1, 0.0f, 3, 0.1f, 1, count);
120+
func(a, b, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
121121
);
122122
}
123123

@@ -131,7 +131,7 @@ PTEST_BEGIN("dsp.interpolation", linear, 5, 10000)
131131
printf("Testing %s numbers...\n", buf);
132132

133133
PTEST_LOOP(buf,
134-
func(a, b, c, -1, 0.0f, 3, 0.1f, 1, count);
134+
func(a, b, c, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
135135
);
136136
}
137137

src/test/utest/interpolation/linear.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 13 дек. 2020 г.
@@ -107,8 +107,8 @@ UTEST_BEGIN("dsp.interpolation", linear)
107107
FloatBuffer dst2(dst1);
108108

109109
// Call functions
110-
func1(dst1, -1, 0.0f, 3, 0.1f, 1, count);
111-
func2(dst2, -1, 0.0f, 3, 0.1f, 1, count);
110+
func1(dst1, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
111+
func2(dst2, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
112112

113113
UTEST_ASSERT_MSG(dst1.valid(), "Destination buffer 1 corrupted");
114114
UTEST_ASSERT_MSG(dst2.valid(), "Destination buffer 2 corrupted");
@@ -146,8 +146,8 @@ UTEST_BEGIN("dsp.interpolation", linear)
146146
FloatBuffer dst2(dst1);
147147

148148
// Call functions
149-
func1(dst1, src, -1, 0.0f, 3, 0.1f, 1, count);
150-
func2(dst2, src, -1, 0.0f, 3, 0.1f, 1, count);
149+
func1(dst1, src, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
150+
func2(dst2, src, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
151151

152152
UTEST_ASSERT_MSG(src.valid(), "Source buffer corrupted");
153153
UTEST_ASSERT_MSG(dst1.valid(), "Destination buffer 1 corrupted");
@@ -188,8 +188,8 @@ UTEST_BEGIN("dsp.interpolation", linear)
188188
FloatBuffer dst2(count, align, mask & 0x04);
189189

190190
// Call functions
191-
func1(dst1, src1, src2, -1, 0.0f, 3, 0.1f, 1, count);
192-
func2(dst2, src1, src2, -1, 0.0f, 3, 0.1f, 1, count);
191+
func1(dst1, src1, src2, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
192+
func2(dst2, src1, src2, -1, 0.0f, 3, 0.1f, 1, uint32_t(count));
193193

194194
UTEST_ASSERT_MSG(src1.valid(), "Source buffer 1 corrupted");
195195
UTEST_ASSERT_MSG(src2.valid(), "Source buffer 2 corrupted");

0 commit comments

Comments
 (0)