From ab85d6a69378adcedd75439bf17c4e437857cd34 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 19 Jun 2025 16:29:52 +0200 Subject: [PATCH 1/2] shut the up -Waggregate-return --- src/r_plane.cpp | 6 ++++++ src/r_things.cpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 9610c0c84..81e02c370 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -737,9 +737,12 @@ void R_DrawPlanes(void) } } #ifdef HAVE_THREADS +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waggregate-return" tp_sema = srb2::g_main_threadpool->end_sema(); srb2::g_main_threadpool->notify_sema(tp_sema); srb2::g_main_threadpool->wait_sema(tp_sema); +#pragma GCC diagnostic pop #endif } @@ -765,9 +768,12 @@ void R_DrawSkyPlanes(void) } } #ifdef HAVE_THREADS +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waggregate-return" tp_sema = srb2::g_main_threadpool->end_sema(); srb2::g_main_threadpool->notify_sema(tp_sema); srb2::g_main_threadpool->wait_sema(tp_sema); +#pragma GCC diagnostic pop #endif } diff --git a/src/r_things.cpp b/src/r_things.cpp index 522caf546..9aaa47c9f 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -2978,9 +2978,12 @@ static void R_DrawMaskedList(drawnode_t* head) #endif R_DrawSinglePlane(&ds, r2->plane, cv_parallelsoftware.value); #ifdef HAVE_THREADS +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waggregate-return" tp_sema = srb2::g_main_threadpool->end_sema(); srb2::g_main_threadpool->notify_sema(tp_sema); srb2::g_main_threadpool->wait_sema(tp_sema); +#pragma GCC diagnostic pop #endif R_DoneWithNode(r2); r2 = next; From 09507d635b4934bdf0b2bf542e6784e7f3d070bd Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 19 Jun 2025 16:30:54 +0200 Subject: [PATCH 2/2] remove now unecessary type cast --- src/r_draw_span.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_draw_span.cpp b/src/r_draw_span.cpp index 07a76b7cc..bd74b4f83 100644 --- a/src/r_draw_span.cpp +++ b/src/r_draw_span.cpp @@ -139,7 +139,7 @@ static void R_DrawSpanTemplate(drawspandata_t* ds) for (i = 0; i < 8; i++) { - bit = (((UINT32)yposition >> ds->nflatyshift) & ds->nflatmask) | ((UINT32)xposition >> ds->nflatxshift); + bit = ((yposition >> ds->nflatyshift) & ds->nflatmask) | (xposition >> ds->nflatxshift); dest[i] = R_DrawSpanPixel(ds, &dsrc[i], colormap, bit, source); @@ -155,7 +155,7 @@ static void R_DrawSpanTemplate(drawspandata_t* ds) while (count-- && dest <= deststop) { - bit = (((UINT32)yposition >> ds->nflatyshift) & ds->nflatmask) | ((UINT32)xposition >> ds->nflatxshift); + bit = ((yposition >> ds->nflatyshift) & ds->nflatmask) | (xposition >> ds->nflatxshift); *dest = R_DrawSpanPixel(ds, dsrc, colormap, bit, source);