When compiling a Release build (without assert) these come up as unused.

Alternative approach would be to Error the compile when test is part of the 
build but assert is not part of the build due to the build being Release.

________________________________
From: Jacob Bachmeyer <[email protected]>
Sent: Saturday, January 31, 2026 15:06
To: Rudi Heitbaum <[email protected]>; [email protected] 
<[email protected]>
Subject: Re: [PATCH 1/3] tests: Cast to void to suppress warnings about unused 
variables

On 1/30/26 19:26, Rudi Heitbaum via Gnupg-devel wrote:
> Address compiler warning when variable is unused because it’s used only in 
> assert.

Does this mean that the assertions are not actually being checked?  If
so, that could be a bit of a problem, given that these are in testsuite
code.

In other words, does this patch "paper over" actual bugs that GCC has
uncovered?


-- Jacob


_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel

Reply via email to