Rebase against c90e46b66ded518dbfb88f1efdc366e7986defb4.

This commit is contained in:
Sebastian Lackner
2016-08-15 20:39:38 +02:00
parent 436e1adc84
commit 4a42867417
5 changed files with 24 additions and 427 deletions

View File

@@ -1,136 +0,0 @@
From 99d742d6850f82d5106a7402ea0fbc680e929202 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 30 Jul 2016 23:53:32 +0200
Subject: comctl32: Avoid misleading indentation warnings.
---
dlls/comctl32/listview.c | 54 ++++++++++++++++++++++++++++++++----------------
1 file changed, 36 insertions(+), 18 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index cfdb7de..0298b12 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -588,23 +588,28 @@ static const char* debugscrollinfo(const SCROLLINFO *pScrollInfo)
if (pScrollInfo == NULL) return "(null)";
len = snprintf(buf, size, "{cbSize=%u, ", pScrollInfo->cbSize);
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (pScrollInfo->fMask & SIF_RANGE)
len = snprintf(buf, size, "nMin=%d, nMax=%d, ", pScrollInfo->nMin, pScrollInfo->nMax);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (pScrollInfo->fMask & SIF_PAGE)
len = snprintf(buf, size, "nPage=%u, ", pScrollInfo->nPage);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (pScrollInfo->fMask & SIF_POS)
len = snprintf(buf, size, "nPos=%d, ", pScrollInfo->nPos);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (pScrollInfo->fMask & SIF_TRACKPOS)
len = snprintf(buf, size, "nTrackPos=%d, ", pScrollInfo->nTrackPos);
else len = 0;
- if (len == -1) goto end; buf += len;
+ if (len == -1) goto end;
+ buf += len;
goto undo;
end:
buf = text + strlen(text);
@@ -629,27 +634,33 @@ static const char* debuglvitem_t(const LVITEMW *lpLVItem, BOOL isW)
if (lpLVItem == NULL) return "(null)";
len = snprintf(buf, size, "{iItem=%d, iSubItem=%d, ", lpLVItem->iItem, lpLVItem->iSubItem);
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpLVItem->mask & LVIF_STATE)
len = snprintf(buf, size, "state=%x, stateMask=%x, ", lpLVItem->state, lpLVItem->stateMask);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpLVItem->mask & LVIF_TEXT)
len = snprintf(buf, size, "pszText=%s, cchTextMax=%d, ", debugtext_tn(lpLVItem->pszText, isW, 80), lpLVItem->cchTextMax);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpLVItem->mask & LVIF_IMAGE)
len = snprintf(buf, size, "iImage=%d, ", lpLVItem->iImage);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpLVItem->mask & LVIF_PARAM)
len = snprintf(buf, size, "lParam=%lx, ", lpLVItem->lParam);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpLVItem->mask & LVIF_INDENT)
len = snprintf(buf, size, "iIndent=%d, ", lpLVItem->iIndent);
else len = 0;
- if (len == -1) goto end; buf += len;
+ if (len == -1) goto end;
+ buf += len;
goto undo;
end:
buf = text + strlen(text);
@@ -665,31 +676,38 @@ static const char* debuglvcolumn_t(const LVCOLUMNW *lpColumn, BOOL isW)
if (lpColumn == NULL) return "(null)";
len = snprintf(buf, size, "{");
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpColumn->mask & LVCF_SUBITEM)
len = snprintf(buf, size, "iSubItem=%d, ", lpColumn->iSubItem);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpColumn->mask & LVCF_FMT)
len = snprintf(buf, size, "fmt=%x, ", lpColumn->fmt);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpColumn->mask & LVCF_WIDTH)
len = snprintf(buf, size, "cx=%d, ", lpColumn->cx);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpColumn->mask & LVCF_TEXT)
len = snprintf(buf, size, "pszText=%s, cchTextMax=%d, ", debugtext_tn(lpColumn->pszText, isW, 80), lpColumn->cchTextMax);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpColumn->mask & LVCF_IMAGE)
len = snprintf(buf, size, "iImage=%d, ", lpColumn->iImage);
else len = 0;
- if (len == -1) goto end; buf += len; size -= len;
+ if (len == -1) goto end;
+ buf += len; size -= len;
if (lpColumn->mask & LVCF_ORDER)
len = snprintf(buf, size, "iOrder=%d, ", lpColumn->iOrder);
else len = 0;
- if (len == -1) goto end; buf += len;
+ if (len == -1) goto end;
+ buf += len;
goto undo;
end:
buf = text + strlen(text);
--
2.9.0

View File

@@ -1,234 +0,0 @@
From 3c4086e64e16a14b6164af7810c15e122f7ff537 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 30 Jul 2016 23:56:41 +0200
Subject: msvcirt/tests: Avoid misleading indentation warnings.
---
dlls/msvcirt/tests/msvcirt.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c
index 1b15949..8f2f8db 100644
--- a/dlls/msvcirt/tests/msvcirt.c
+++ b/dlls/msvcirt/tests/msvcirt.c
@@ -3122,7 +3122,9 @@ static void test_ostream(void) {
/* flush */
if (0) /* crashes on native */
+{
pos = call_func1(p_ostream_flush, &os1);
+}
os1.base_ios.sb = &fb2.base;
call_func1(p_filebuf_ctor, &fb2);
pos = call_func1(p_ostream_flush, &os1);
@@ -3178,7 +3180,9 @@ if (0) /* crashes on native */
os1.base_ios.tie = &os2;
os2.base_ios.sb = NULL;
if (0) /* crashes on native */
+{
ret = (int) call_func1(p_ostream_opfx, &os1);
+}
os2.base_ios.sb = &fb2.base;
os2.base_ios.state = IOSTATE_badbit;
ret = (int) call_func3(p_streambuf_xsputn, &fb1.base, "We've known each other", 22);
@@ -3205,7 +3209,9 @@ if (0) /* crashes on native */
ok(ret == 1, "expected 1 got %d\n", ret);
os1.base_ios.sb = NULL;
if (0) /* crashes on native */
+{
call_func1(p_ostream_osfx, &os1);
+}
os1.base_ios.sb = &fb1.base;
os1.base_ios.flags = FLAGS_unitbuf;
call_func1(p_ostream_osfx, &os1);
@@ -3245,7 +3251,9 @@ if (0) /* crashes on native */
ok(fb1.base.pptr == fb1.base.base + 1, "wrong put pointer, expected %p got %p\n", fb1.base.base + 1, fb1.base.pptr);
os1.base_ios.sb = NULL;
if (0) /* crashes on native */
+{
pos = call_func2(p_ostream_put_char, &os1, 'c');
+}
os1.base_ios.sb = &fb1.base;
os1.base_ios.width = 5;
call_func1(p_filebuf_sync, &fb1);
@@ -3277,7 +3285,9 @@ if (0) /* crashes on native */
ok(fb1.base.pptr == fb1.base.base + 7, "wrong put pointer, expected %p got %p\n", fb1.base.base + 7, fb1.base.pptr);
os1.base_ios.sb = NULL;
if (0) /* crashes on native */
+{
pos = call_func3(p_ostream_write_char, &os1, "been", 4);
+}
os1.base_ios.sb = &fb1.base;
os1.base_ios.width = 5;
call_func1(p_filebuf_sync, &fb1);
@@ -3393,7 +3403,9 @@ if (0) /* crashes on native */
ok(pos == &os1, "wrong return, expected %p got %p\n", &os1, pos);
ok(!strncmp(fb1.base.pptr - 6, "abzzzz", 6), "expected 'abzzzz' got '%s'\n", fb1.base.pptr - 6);
if (0) /* crashes on native */
+{
pos = call_func3(p_ostream_writepad, &os1, NULL, "o");
+}
pos = call_func3(p_ostream_writepad, &os1, "", "hello");
ok(pos == &os1, "wrong return, expected %p got %p\n", &os1, pos);
ok(!strncmp(fb1.base.pptr - 6, "helloz", 6), "expected 'helloz' got '%s'\n", fb1.base.pptr - 6);
@@ -3856,7 +3868,9 @@ static void test_ostream_withassign(void)
osa1.unknown = 0xabababab;
osa1.base_ios.sb = (streambuf*) 0xabababab;
if (0) /* crashes on native */
+{
osa1.base_ios.delbuf = 0xabababab;
+}
posa = call_func2(p_ostream_withassign_assign_sb, &osa1, &sb);
ok(posa == &osa1, "wrong return, expected %p got %p\n", &osa1, posa);
ok(osa1.unknown == 0xabababab, "expected %d got %d\n", 0xabababab, osa1.unknown);
@@ -4036,7 +4050,9 @@ static void test_istream(void)
ok(is2.base_ios.precision == 6, "expected 6 got %d\n", is2.base_ios.precision);
ok(is2.base_ios.width == 0, "expected 0 got %d\n", is2.base_ios.width);
if (0) /* crashes on native */
+{
pis = call_func2(p_istream_assign, &is2, NULL);
+}
is2.extract_delim = is2.count = 0xabababab;
is2.base_ios.sb = (streambuf*) 0xabababab;
is2.base_ios.state = 0xabababab;
@@ -4072,7 +4088,9 @@ if (0) /* crashes on native */
/* eatwhite */
is1.extract_delim = is1.count = 0;
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
is1.base_ios.state = IOSTATE_badbit;
is1.base_ios.flags = 0;
call_func1(p_istream_eatwhite, &is1);
@@ -4140,7 +4158,9 @@ if (0) /* crashes on native */
ok(is1.base_ios.state == (IOSTATE_badbit|IOSTATE_failbit), "expected %d got %d\n",
IOSTATE_badbit|IOSTATE_failbit, is1.base_ios.state);
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
is1.base_ios.state = IOSTATE_goodbit;
is1.base_ios.tie = &os;
pos = call_func3(p_ostream_sb_ctor, &os, &fb2.base, TRUE);
@@ -4407,7 +4427,9 @@ if (0) /* crashes on native */
ok(fb1.base.gptr == NULL, "wrong get pointer, expected %p got %p\n", NULL, fb1.base.gptr);
ok(buffer[0] == 0, "expected 0 got %d\n", buffer[0]);
if (0) /* crashes on native */
+{
pis = call_func4(p_istream_get_str_delim, &is1, (char*) 0x1, 5, 0);
+}
/* get_str */
is1.extract_delim = is1.count = 0xabababab;
@@ -4545,7 +4567,9 @@ if (0) /* crashes on native */
ok(fb1.base.gptr == fb1.base.base + 3, "wrong get pointer, expected %p got %p\n", fb1.base.base + 3, fb1.base.gptr);
ok(c == -50, "expected %d got %d\n", -50, c);
if (0) /* crashes on native */
+{
pis = call_func2(p_istream_get_char, &is1, NULL);
+}
fb1.base.gptr = fb1.base.base + 30;
pis = call_func2(p_istream_get_char, &is1, &c);
ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis);
@@ -4657,7 +4681,9 @@ if (0) /* crashes on native */
ok(fb2.base.epptr == NULL, "wrong put end, expected %p got %p\n", NULL, fb2.base.epptr);
is1.base_ios.state = IOSTATE_goodbit;
if (0) /* crashes on native */
+{
pis = call_func3(p_istream_get_sb, &is1, NULL, '?');
+}
*fb1.base.gptr = -50;
pis = call_func3(p_istream_get_sb, &is1, &fb2.base, -50);
ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis);
@@ -4851,7 +4877,9 @@ if (0) /* crashes on native */
ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state);
ok(fb1.base.gptr == fb1.base.base, "wrong get pointer, expected %p got %p\n", fb1.base.base, fb1.base.gptr);
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
fb1.base.gptr = fb1.base.base + 14;
ret = (int) call_func1(p_istream_peek, &is1);
ok(ret == 206, "expected 206 got %d\n", ret);
@@ -4896,7 +4924,9 @@ if (0) /* crashes on native */
ok(fb1.base.gptr == fb1.base.base + 15, "wrong get pointer, expected %p got %p\n", fb1.base.base + 15, fb1.base.gptr);
is1.base_ios.state = IOSTATE_goodbit;
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
pis = call_func2(p_istream_putback, &is1, -40);
ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis);
ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state);
@@ -4954,13 +4984,17 @@ if (0) /* crashes on native */
ok(!strncmp(buffer, fb1.base.base, 30), "unexpected buffer content, got '%s'\n", buffer);
ok(buffer[30] == 'A', "expected 'A' got %d\n", buffer[30]);
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
is1.base_ios.state = IOSTATE_goodbit;
fb1.base.eback = fb1.base.gptr = fb1.base.base;
fb1.base.egptr = fb1.base.base + 30;
memset(buffer, 'A', sizeof(buffer));
if (0) /* crashes on native */
+{
pis = call_func3(p_istream_read, &is1, buffer, -1);
+}
pis = call_func3(p_istream_read, &is1, buffer, 0);
ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis);
ok(is1.count == 0, "expected 0 got %d\n", is1.count);
@@ -4976,7 +5010,9 @@ if (0) /* crashes on native */
ok(fb1.base.gptr == NULL, "wrong get pointer, expected %p got %p\n", NULL, fb1.base.gptr);
ok(_tell(fb1.fd) == 0, "expected 0 got %d\n", _tell(fb1.fd));
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
pis = call_func2(p_istream_seekg, &is1, -5);
ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis);
ok(is1.base_ios.state == IOSTATE_failbit, "expected %d got %d\n", IOSTATE_failbit, is1.base_ios.state);
@@ -5009,7 +5045,9 @@ if (0) /* crashes on native */
ok(is1.base_ios.state == IOSTATE_failbit, "expected %d got %d\n", IOSTATE_failbit, is1.base_ios.state);
ok(fb1.base.gptr == fb1.base.base, "wrong get pointer, expected %p got %p\n", fb1.base.base, fb1.base.gptr);
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
fb1.base.gptr = fb1.base.egptr;
pis = call_func3(p_istream_seekg_offset, &is1, 0, SEEKDIR_end);
ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis);
@@ -5030,7 +5068,9 @@ if (0) /* crashes on native */
ok(ret == 0, "expected 0 got %d\n", ret);
ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state);
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
fb1.base.eback = fb1.base.gptr = fb1.base.base;
fb1.base.egptr = fb1.base.base + 30;
ret = (int) call_func1(p_istream_sync, &is1);
@@ -5063,7 +5103,9 @@ if (0) /* crashes on native */
ok(ret == 24, "expected 24 got %d\n", ret);
ok(is1.base_ios.state == IOSTATE_goodbit, "expected %d got %d\n", IOSTATE_goodbit, is1.base_ios.state);
if (0) /* crashes on native */
+{
is1.base_ios.sb = NULL;
+}
fb1.base.eback = fb1.base.gptr = fb1.base.base;
fb1.base.egptr = fb1.base.base + 30;
ret = (int) call_func1(p_istream_tellg, &is1);
@@ -6015,7 +6057,9 @@ static void test_iostream(void)
memset(&ios2.base_ios, 0xcd, sizeof(ios));
ios2.base_ios.delbuf = 0;
if (0) /* crashes on native */
+{
pios = call_func2(p_iostream_assign, &ios2, NULL);
+}
pios = call_func2(p_iostream_assign, &ios2, &ios1);
ok(pios == &ios2, "wrong return, expected %p got %p\n", &ios2, pios);
ok(ios2.base1.extract_delim == 0xcdcdcdcd, "expected %d got %d\n", 0xcdcdcdcd, ios2.base1.extract_delim);
--
2.9.0

View File

@@ -1,26 +0,0 @@
From d93228af9587d69553082d48523a49e74a536704 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 30 Jul 2016 23:57:11 +0200
Subject: oleaut32/tests: Avoid misleading indentation warnings.
---
dlls/oleaut32/tests/safearray.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c
index f57b886..787891c 100644
--- a/dlls/oleaut32/tests/safearray.c
+++ b/dlls/oleaut32/tests/safearray.c
@@ -706,7 +706,9 @@ static void test_safearray(void)
}
if (!pSafeArrayAllocDescriptorEx)
+ {
return;
+ }
for (i=0;i<sizeof(vttypes)/sizeof(vttypes[0]);i++) {
a = NULL;
--
2.9.0