Skip to content

Commit 66a66f1

Browse files
committed
fix(log): fix Windows platform compilation errors
- src/libipc/platform/win/get_sa.h: * Fix malformed log.error() calls on lines 19 and 23 * Remove extra comma and parenthesis: GetLastError(, -> GetLastError() * Fix closing parenthesis and bracket placement * Line 19: GetLastError(, "]"))) -> GetLastError()), "]" * Line 23: GetLastError(, "]"))) -> GetLastError()), "]" - src/libipc/platform/win/mutex.h: * Add missing LIBIPC_LOG() to try_lock() function at line 84 * The function uses log.error() at line 95 and needs logger initialization These fixes resolve Windows compilation errors related to malformed log calls and missing LIBIPC_LOG() macro.
1 parent 0f8bd34 commit 66a66f1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/libipc/platform/win/get_sa.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ inline LPSECURITY_ATTRIBUTES get_sa() {
1616

1717
initiator() {
1818
if (!::InitializeSecurityDescriptor(&sd_, SECURITY_DESCRIPTOR_REVISION)) {
19-
log.error("fail InitializeSecurityDescriptor[", static_cast<int>(::GetLastError(, "]")));
19+
log.error("fail InitializeSecurityDescriptor[", static_cast<int>(::GetLastError()), "]");
2020
return;
2121
}
2222
if (!::SetSecurityDescriptorDacl(&sd_, TRUE, NULL, FALSE)) {
23-
log.error("fail SetSecurityDescriptorDacl[", static_cast<int>(::GetLastError(, "]")));
23+
log.error("fail SetSecurityDescriptorDacl[", static_cast<int>(::GetLastError()), "]");
2424
return;
2525
}
2626
sa_.nLength = sizeof(SECURITY_ATTRIBUTES);

src/libipc/platform/win/mutex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class mutex {
8282
}
8383

8484
bool try_lock() noexcept(false) {
85+
LIBIPC_LOG();
8586
DWORD ret = ::WaitForSingleObject(h_, 0);
8687
switch (ret) {
8788
case WAIT_OBJECT_0:

0 commit comments

Comments
 (0)