[PATCH 01/12] advapi32/tests: Fix misleading indentation warnings

Fabian Maurer dark.shadow4 at web.de
Tue Jan 25 15:06:23 CST 2022


Next patchset to fix compiler warnings. There's a lot more to come...
I split it up since I figured that's required.

I hope I got all of them. For some reason gcc doesn't always
give the same warnings.

I also only change the indentation where it actually is needed,
to cause at least change as possible.
wine_todo with curly braces can remain the same.
I left quite a few wine_todo with the wrong indentation,
as long as they don't cause issues for now.
This is for example in a single if/else branch, or at the end of a method.

I send it as a series, but they are functionally independent.
If one patch is not good enough, you can apply the rest still fine.

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 dlls/advapi32/tests/security.c | 16 ++++++++--------
 dlls/advapi32/tests/service.c  |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index c73e28a98e6..009a941c700 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -1028,7 +1028,7 @@ cleanup:

     rc = GetFileAttributesA(file);
     rc &= ~(FILE_ATTRIBUTE_NOT_CONTENT_INDEXED|FILE_ATTRIBUTE_COMPRESSED);
-todo_wine
+    todo_wine
     ok(rc == (FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY),
        "expected FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY got %#x\n", rc);

@@ -1488,10 +1488,10 @@ static void test_AccessCheck(void)
     ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping,
                       0, &PrivSetLen, &Access, &AccessStatus);
     err = GetLastError();
-todo_wine
+    todo_wine
     ok(!ret && err == ERROR_INSUFFICIENT_BUFFER, "AccessCheck should have "
        "failed with ERROR_INSUFFICIENT_BUFFER, instead of %d\n", err);
-todo_wine
+    todo_wine
     ok(PrivSetLen == sizeof(PRIVILEGE_SET), "PrivSetLen returns %d\n", PrivSetLen);
     ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed,
        "Access and/or AccessStatus were changed!\n");
@@ -1600,7 +1600,7 @@ todo_wine
                       PrivSet, &PrivSetLen, &Access, &AccessStatus);
     err = GetLastError();
     ok(ret, "AccessCheck failed with error %d\n", GetLastError());
-todo_wine
+    todo_wine
     ok(PrivSetLen == sizeof(PRIVILEGE_SET) + 1, "PrivSetLen returns %d\n", PrivSetLen);
     ok(AccessStatus && (Access == KEY_READ),
         "AccessCheck failed to grant access with error %d\n", GetLastError());
@@ -5365,9 +5365,9 @@ static void validate_default_security_descriptor(SECURITY_DESCRIPTOR *sd)
     SetLastError(0xdeadbeef);
     ret = GetSecurityDescriptorDacl(sd, &present, &acl, &defaulted);
     ok(ret, "GetSecurityDescriptorDacl error %d\n", GetLastError());
-todo_wine
+    todo_wine
     ok(present == 1, "acl is not present\n");
-todo_wine
+    todo_wine
     ok(acl != (void *)0xdeadbeef && acl != NULL, "acl pointer is not set\n");
     ok(defaulted == 0, "defaulted is set to TRUE\n");

@@ -5376,7 +5376,7 @@ todo_wine
     SetLastError(0xdeadbeef);
     ret = GetSecurityDescriptorOwner(sd, &sid, &defaulted);
     ok(ret, "GetSecurityDescriptorOwner error %d\n", GetLastError());
-todo_wine
+    todo_wine
     ok(sid != (void *)0xdeadbeef && sid != NULL, "sid pointer is not set\n");
     ok(defaulted == 0, "defaulted is set to TRUE\n");

@@ -5385,7 +5385,7 @@ todo_wine
     SetLastError(0xdeadbeef);
     ret = GetSecurityDescriptorGroup(sd, &sid, &defaulted);
     ok(ret, "GetSecurityDescriptorGroup error %d\n", GetLastError());
-todo_wine
+    todo_wine
     ok(sid != (void *)0xdeadbeef && sid != NULL, "sid pointer is not set\n");
     ok(defaulted == 0, "defaulted is set to TRUE\n");
 }
diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c
index cbe7fffbc7a..21704048778 100644
--- a/dlls/advapi32/tests/service.c
+++ b/dlls/advapi32/tests/service.c
@@ -2728,7 +2728,7 @@ static void test_EventLog(void)
        !strcmpi(config->lpBinaryPathName, "C:\\windows\\system32\\svchost.exe -k LocalServiceNetworkRestricted") /* Vista+ */ ||
        !strcmpi(config->lpBinaryPathName, "C:\\windows\\system32\\svchost.exe -k LocalServiceNetworkRestricted -p") /* Win10 */,
        "got %s\n", config->lpBinaryPathName);
-todo_wine
+    todo_wine
     ok(!strcmpi(config->lpLoadOrderGroup, "Event Log"), "got %s\n", config->lpLoadOrderGroup);
     ok(config->dwTagId == 0, "Expected 0, got %d\n", config->dwTagId);
     ok(!config->lpDependencies[0], "lpDependencies is not empty\n");
@@ -2749,7 +2749,7 @@ todo_wine
        status.dwServiceType == (SERVICE_WIN32_SHARE_PROCESS | SERVICE_WIN32_OWN_PROCESS) /* Win10 */,
        "got %#x\n", status.dwServiceType);
     ok(status.dwCurrentState == SERVICE_RUNNING, "got %#x\n", status.dwCurrentState);
-todo_wine
+    todo_wine
     ok(status.dwControlsAccepted == SERVICE_ACCEPT_SHUTDOWN /* XP */ ||
        status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN) /* 2008 */ ||
        status.dwControlsAccepted == (SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_TIMECHANGE | SERVICE_ACCEPT_SHUTDOWN),
--
2.35.0




More information about the wine-devel mailing list