From 08d9716a9a2c14b0df2cef1048ef98bc2a4eb5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 27 Sep 2021 09:18:40 +0200 Subject: [PATCH] video_producer_demo: fix comparison warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibfc8780c55e229190573918a4cf1f119b5e345c6 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4504 Reviewed-by: Franck LeCodeur Reviewed-by: Jérôme Duval --- build/jam/ArchitectureRules | 2 +- .../media-add-ons/video_producer_demo/Producer.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 71b48b1763..6612cb113f 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -716,7 +716,7 @@ rule ArchitectureSetupWarnings architecture EnableWerror src add-ons media media-add-ons usb_vision ; # EnableWerror src add-ons media media-add-ons usb_webcam ; EnableWerror src add-ons media media-add-ons video_mixer ; -# EnableWerror src add-ons media media-add-ons video_producer_demo ; + EnableWerror src add-ons media media-add-ons video_producer_demo ; EnableWerror src add-ons media media-add-ons videowindow ; EnableWerror src add-ons media media-add-ons writer ; EnableWerror src add-ons media plugins ape_reader ; diff --git a/src/add-ons/media/media-add-ons/video_producer_demo/Producer.cpp b/src/add-ons/media/media-add-ons/video_producer_demo/Producer.cpp index 38b637b041..df97596edd 100644 --- a/src/add-ons/media/media-add-ons/video_producer_demo/Producer.cpp +++ b/src/add-ons/media/media-add-ons/video_producer_demo/Producer.cpp @@ -440,8 +440,8 @@ VideoProducer::Connect(status_t error, const media_source &source, return; } bigtime_t now = system_time(); - for (int y = 0; y < (int)fConnectedFormat.display.line_count; y++) - for (int x = 0; x < (int)fConnectedFormat.display.line_width; x++) + for (uint32 y = 0; y < fConnectedFormat.display.line_count; y++) + for (uint32 x = 0; x < fConnectedFormat.display.line_width; x++) *(p++) = ((((x+y)^0^x)+f) & 0xff) * (0x01010101 & fColor); fProcessingLatency = system_time() - now; free(buffer); @@ -724,8 +724,8 @@ VideoProducer::FrameGenerator() if (fColor == 0xff000000) { // display a gray block that moves uint32 *p = (uint32 *)buffer->Data(); - for (int y = 0; y < (int)fConnectedFormat.display.line_count; y++) - for (int x = 0; x < (int)fConnectedFormat.display.line_width; x++) { + for (uint32 y = 0; y < fConnectedFormat.display.line_count; y++) + for (uint32 x = 0; x < fConnectedFormat.display.line_width; x++) { if (x > (fFrame & 0xff) && x < (fFrame & 0xff) + 60 && y > 90 && y < 150) { *(p++) = 0xff777777; } else { @@ -736,8 +736,8 @@ VideoProducer::FrameGenerator() /* Fill in a pattern */ uint32 *p = (uint32 *)buffer->Data(); - for (int y = 0; y < (int)fConnectedFormat.display.line_count; y++) - for (int x = 0; x < (int)fConnectedFormat.display.line_width; x++) + for (uint32 y = 0; y < fConnectedFormat.display.line_count; y++) + for (uint32 x = 0; x < fConnectedFormat.display.line_width; x++) *(p++) = ((((x+y)^0^x)+fFrame) & 0xff) * (0x01010101 & fColor); }