From cf90caaf51dddd89883424d69ca78379fcaabedc Mon Sep 17 00:00:00 2001 From: charlie-foxtrot <13514783+charlie-foxtrot@users.noreply.github.com> Date: Mon, 1 May 2023 22:45:12 -0400 Subject: [PATCH] fix v4.1.0 build issues: (#378) - CMake missing include directory for config.h - build warnings on unused variables and different signedness --- src/hello_fft/CMakeLists.txt | 3 ++- src/hello_fft/gpu_fft.h | 2 +- src/hello_fft/gpu_fft_base.c | 6 +++--- src/hello_fft/gpu_fft_twiddles.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hello_fft/CMakeLists.txt b/src/hello_fft/CMakeLists.txt index b0d80a6..0838edd 100644 --- a/src/hello_fft/CMakeLists.txt +++ b/src/hello_fft/CMakeLists.txt @@ -12,6 +12,7 @@ add_library(hello_fft OBJECT ${hello_fft_source_files} ) target_include_directories(hello_fft PUBLIC - ".." + ".." # needed for rtl_airband.h + "${CMAKE_CURRENT_BINARY_DIR}/.." # needed for config.h ${BCM_VC_INCLUDE_DIRS} ) diff --git a/src/hello_fft/gpu_fft.h b/src/hello_fft/gpu_fft.h index d299125..19cc14f 100644 --- a/src/hello_fft/gpu_fft.h +++ b/src/hello_fft/gpu_fft.h @@ -84,7 +84,7 @@ unsigned int *gpu_fft_shader_code(int); unsigned gpu_fft_base_exec ( struct GPU_FFT_BASE *base, - int num_qpus); + unsigned num_qpus); int gpu_fft_alloc ( int mb, diff --git a/src/hello_fft/gpu_fft_base.c b/src/hello_fft/gpu_fft_base.c index c3897ef..ba92393 100644 --- a/src/hello_fft/gpu_fft_base.c +++ b/src/hello_fft/gpu_fft_base.c @@ -49,9 +49,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. unsigned gpu_fft_base_exec_direct ( struct GPU_FFT_BASE *base, - int num_qpus) { + unsigned num_qpus) { - unsigned q, t; + unsigned q; base->peri[V3D_DBCFG] = 0; // Disallow IRQ base->peri[V3D_DBQITE] = 0; // Disable IRQ @@ -77,7 +77,7 @@ unsigned gpu_fft_base_exec_direct ( unsigned gpu_fft_base_exec( struct GPU_FFT_BASE *base, - int num_qpus) { + unsigned num_qpus) { if (base->vc_msg) { // Use mailbox diff --git a/src/hello_fft/gpu_fft_twiddles.c b/src/hello_fft/gpu_fft_twiddles.c index 2a2970d..3b7d85f 100644 --- a/src/hello_fft/gpu_fft_twiddles.c +++ b/src/hello_fft/gpu_fft_twiddles.c @@ -67,7 +67,7 @@ static float *twiddles_base_64(double two_pi, float *out) { /****************************************************************************/ -static float *twiddles_step_16(double two_pi, float *out, double theta) { +static float *twiddles_step_16(double /*two_pi*/, float *out, double theta) { int i; for (i=0; i<16; i++) { *out++ = ALPHA(theta*k[i]);