Suppress bogus warning from MinGW


When trying to force asserts, MinGW starts complaining about calling
qFromUnaligned<uint16_t>() with a static QBA::_empty member:

  error: array subscript 'short unsigned int[0]' is partly outside
         array bounds of 'const char [1]' [-Werror=array-bounds=]

However, the code explicitly checks that QBA size is >= 2 before
going into this branch, so it looks like an incorrect disgnostics
from MinGW.

We already had the similar warnings in other places, and
qtbase/de005e7976e4b110d6b5f32a8bab5141713acb7b suggests that the
proper fix is to cache the QBA::size().

However, applying this fix alone does not solve the problem, so
explicitly create a QByteArrayView on the response, and use it
in all the operations, except for the final assignment.

Fixes: QTBUG-129763
Pick-to: 6.8 6.5
Change-Id: I1e7ce87801320a0960fded208a41984e7668dfb0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
commit25a30c024114ae375b0941daa381c3b977c12e54
parentb6c27e56ee4d1f49dec5273b2cc24b7e9cf2c826
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeMon, 21 Oct 2024 09:37:34 +0200