From af4f9b805a947b4495961a519af6045cd3f19a33 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 25 Jul 2024 13:58:10 +0200 Subject: Fix variable shadow warnings --- src/capture/kms.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/capture') diff --git a/src/capture/kms.c b/src/capture/kms.c index 25d4956..b3b4be2 100644 --- a/src/capture/kms.c +++ b/src/capture/kms.c @@ -354,6 +354,7 @@ static int gsr_capture_kms_capture(gsr_capture *cap, AVFrame *frame, gsr_color_c uint32_t offsets[GSR_KMS_MAX_DMA_BUFS]; uint32_t pitches[GSR_KMS_MAX_DMA_BUFS]; uint64_t modifiers[GSR_KMS_MAX_DMA_BUFS]; + for(int i = 0; i < drm_fd->num_dma_bufs; ++i) { fds[i] = drm_fd->dma_buf[i].fd; offsets[i] = drm_fd->dma_buf[i].offset; @@ -427,10 +428,6 @@ static int gsr_capture_kms_capture(gsr_capture *cap, AVFrame *frame, gsr_color_c cursor_pos.x += target_x; cursor_pos.y += target_y; - int fds[GSR_KMS_MAX_DMA_BUFS]; - uint32_t offsets[GSR_KMS_MAX_DMA_BUFS]; - uint32_t pitches[GSR_KMS_MAX_DMA_BUFS]; - uint64_t modifiers[GSR_KMS_MAX_DMA_BUFS]; for(int i = 0; i < cursor_drm_fd->num_dma_bufs; ++i) { fds[i] = cursor_drm_fd->dma_buf[i].fd; offsets[i] = cursor_drm_fd->dma_buf[i].offset; -- cgit v1.2.3