Eric Pouech : oledb32/tests: Silence some gcc11 warnings (-Warray-bounds).

Alexandre Julliard julliard at winehq.org
Thu Feb 17 15:34:00 CST 2022


Module: wine
Branch: master
Commit: 1b5445687d5d5d1f41b5dd3c6a6c700560cf1047
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1b5445687d5d5d1f41b5dd3c6a6c700560cf1047

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Thu Feb 17 11:16:48 2022 +0100

oledb32/tests: Silence some gcc11 warnings (-Warray-bounds).

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oledb32/tests/convert.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c
index 0d888e834e3..7144150c2bc 100644
--- a/dlls/oledb32/tests/convert.c
+++ b/dlls/oledb32/tests/convert.c
@@ -327,7 +327,7 @@ static void test_converttoi1(void)
 {
     HRESULT hr;
     signed char dst;
-    BYTE src[20];
+    BYTE src[sizeof(VARIANT)]; /* assuming that VARIANT is larger than all the types used in src */
     DBSTATUS dst_status;
     DBLENGTH dst_len;
     static const WCHAR ten[] = {'1','0',0};
@@ -638,7 +638,7 @@ static void test_converttoi2(void)
 {
     HRESULT hr;
     signed short dst;
-    BYTE src[20];
+    BYTE src[sizeof(VARIANT)]; /* assuming that VARIANT is larger than all the types used in src */
     DBSTATUS dst_status;
     DBLENGTH dst_len;
     static const WCHAR ten[] = {'1','0',0};
@@ -950,7 +950,7 @@ static void test_converttoi4(void)
 {
     HRESULT hr;
     INT i4;
-    BYTE src[20];
+    BYTE src[sizeof(VARIANT)];  /* assuming that VARIANT is larger than all the types used in src */
     DBSTATUS dst_status;
     DBLENGTH dst_len;
     static const WCHAR ten[] = {'1','0',0};
@@ -1224,7 +1224,7 @@ static void test_converttoi8(void)
 {
     HRESULT hr;
     LARGE_INTEGER dst;
-    BYTE src[20];
+    BYTE src[sizeof(VARIANT)];  /* assuming that VARIANT is larger than all the types used in src */
     DBSTATUS dst_status;
     DBLENGTH dst_len;
     static const WCHAR ten[] = {'1','0',0};
@@ -2774,7 +2774,7 @@ static void test_converttoui4(void)
 {
     HRESULT hr;
     DWORD dst;
-    BYTE src[20];
+    BYTE src[sizeof(VARIANT)];
     DBSTATUS dst_status;
     DBLENGTH dst_len;
 




More information about the wine-cvs mailing list