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.
This commit is contained in:
木头云 2025-12-15 11:42:57 +00:00
parent 0f8bd3415c
commit 66a66f15ec
2 changed files with 3 additions and 2 deletions

View File

@ -16,11 +16,11 @@ inline LPSECURITY_ATTRIBUTES get_sa() {
initiator() {
if (!::InitializeSecurityDescriptor(&sd_, SECURITY_DESCRIPTOR_REVISION)) {
log.error("fail InitializeSecurityDescriptor[", static_cast<int>(::GetLastError(, "]")));
log.error("fail InitializeSecurityDescriptor[", static_cast<int>(::GetLastError()), "]");
return;
}
if (!::SetSecurityDescriptorDacl(&sd_, TRUE, NULL, FALSE)) {
log.error("fail SetSecurityDescriptorDacl[", static_cast<int>(::GetLastError(, "]")));
log.error("fail SetSecurityDescriptorDacl[", static_cast<int>(::GetLastError()), "]");
return;
}
sa_.nLength = sizeof(SECURITY_ATTRIBUTES);

View File

@ -82,6 +82,7 @@ public:
}
bool try_lock() noexcept(false) {
LIBIPC_LOG();
DWORD ret = ::WaitForSingleObject(h_, 0);
switch (ret) {
case WAIT_OBJECT_0: