CheckStructHasMember: avoid breakage on -Wall -Werror (#15203)

With CMAKE_C_FLAGS='-Wall -Werror', this test breaks due to
-Werror=unused-value. Fix this by ignoring the return value.
Merge topic 'CheckStructHasMember-avoid-breakage-on-Wall' into next

384d3ce7 CheckStructHasMember: avoid breakage on -Wall -Werror (#15203)