Skip to content

Commit 8014367

Browse files
authored
fix: Remove redundant declarations (#5210)
This is an emergency fix on top of #5201. PR #5201 passed CI completely. Then I merged it, and now it fails. How did that happen? OOOOOOH. The imagespeed_test.cpp is not compiled at all for CI! Only for local builds. So a build break in it will not be caught in CI. OK, fixing that, too. It doesn't run in CI, it's not that kind of test, it's a special benchmarking test meant to run locally and needs to be told a specific image file to test with. But at least build it for CI so we can't inadvertently break it again. Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent bd7c698 commit 8014367

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

src/libOpenImageIO/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,10 @@ if (OIIO_BUILD_TESTS AND BUILD_TESTING)
299299
add_test (unit_imageinout ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/imageinout_test)
300300
set_tests_properties (unit_imageinout PROPERTIES PROCESSORS 2 COST 30)
301301

302-
if (NOT DEFINED ENV{OpenImageIO_CI})
303-
fancy_add_executable (NAME imagespeed_test SRC imagespeed_test.cpp
304-
LINK_LIBRARIES OpenImageIO
305-
FOLDER "Unit Tests" NO_INSTALL)
306-
#add_test (imagespeed_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/imagespeed_test)
307-
endif ()
302+
fancy_add_executable (NAME imagespeed_test SRC imagespeed_test.cpp
303+
LINK_LIBRARIES OpenImageIO
304+
FOLDER "Unit Tests" NO_INSTALL)
305+
#add_test (imagespeed_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/imagespeed_test)
308306

309307
fancy_add_executable (NAME compute_test SRC compute_test.cpp
310308
LINK_LIBRARIES OpenImageIO

src/libOpenImageIO/imagespeed_test.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ time_write_scanline_at_a_time()
203203

204204
size_t pixelsize = outspec.nchannels * sizeof(float);
205205
imagesize_t scanlinesize = outspec.width * pixelsize;
206-
bool ok = true;
207206
for (int y = 0; y < outspec.height && ok; ++y) {
208207
ok = out->write_scanline(y + outspec.y, outspec.z, bufspec.format,
209208
&buffer[scanlinesize * y]);
@@ -220,7 +219,6 @@ time_write_64_scanlines_at_a_time()
220219
OIIO_ASSERT(out);
221220
bool ok = out->open(output_filename, outspec);
222221
OIIO_ASSERT(ok);
223-
bool ok = true;
224222
size_t pixelsize = outspec.nchannels * sizeof(float);
225223
imagesize_t scanlinesize = outspec.width * pixelsize;
226224
for (int y = 0; y < outspec.height && ok; y += 64) {
@@ -246,7 +244,6 @@ time_write_tile_at_a_time()
246244
size_t pixelsize = outspec.nchannels * sizeof(float);
247245
imagesize_t scanlinesize = outspec.width * pixelsize;
248246
imagesize_t planesize = outspec.height * scanlinesize;
249-
bool ok = true;
250247
for (int z = 0; z < outspec.depth && ok; z += outspec.tile_depth) {
251248
for (int y = 0; y < outspec.height && ok; y += outspec.tile_height) {
252249
for (int x = 0; x < outspec.width && ok; x += outspec.tile_width) {
@@ -272,7 +269,6 @@ time_write_tiles_row_at_a_time()
272269

273270
size_t pixelsize = outspec.nchannels * sizeof(float);
274271
imagesize_t scanlinesize = outspec.width * pixelsize;
275-
bool ok = true;
276272
for (int z = 0; z < outspec.depth && ok; z += outspec.tile_depth) {
277273
for (int y = 0; y < outspec.height && ok; y += outspec.tile_height) {
278274
ok = out->write_tiles(outspec.x, outspec.x + outspec.width,

0 commit comments

Comments
 (0)