xcp-ng / uefistored

Variables store for UEFI guests. Note: in XCP-ng 8.3+, we switched to varstored in order to share a common implementation with XenServer.
GNU General Public License v2.0
7 stars 3 forks source link

build: fix new GCC 11 warnings #16

Closed beshleman closed 3 years ago

beshleman commented 3 years ago

Compiling the tests with GCC11 with flag -Werror fails due to two violations. One is -Warray-parameter and the other is -Wvla-parameter.

This commit fixes the code violating the array-parameter check. It suppresses the vla-parameter check when building tests because the violating code exists in the munit dependency, not in uefistored itself.

Some future vla-parameter violations may wrongfully suppressed as a side effect when building the tests. The production build will not have that error suppressed.

Signed-off-by: Bobby Eshleman bobby.eshleman@gmail.com