From 455a4f2176a5cfbe325e1e40cea20dd3e466b64c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 12 Jun 2024 12:30:04 +0200 Subject: Avoid conflict with C++17 features std::byte by using uint8 type instead of byte --- src/Core/Unix/CoreService.cpp | 6 +++--- src/Core/Unix/CoreUnix.cpp | 2 +- src/Core/Unix/Linux/CoreLinux.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Core/Unix') diff --git a/src/Core/Unix/CoreService.cpp b/src/Core/Unix/CoreService.cpp index e3fca20e..6d0f05e5 100644 --- a/src/Core/Unix/CoreService.cpp +++ b/src/Core/Unix/CoreService.cpp @@ -57,7 +57,7 @@ namespace VeraCrypt // Wait for sync code while (true) { - byte b; + uint8 b; throw_sys_if (read (STDIN_FILENO, &b, 1) != 1); if (b != 0x00) continue; @@ -543,7 +543,7 @@ namespace VeraCrypt try { - shared_ptr stream (new MemoryStream (ConstBufferPtr ((byte *) &errOutput[0], errOutput.size()))); + shared_ptr stream (new MemoryStream (ConstBufferPtr ((uint8 *) &errOutput[0], errOutput.size()))); deserializedObject.reset (Serializable::DeserializeNew (stream)); deserializedException = dynamic_cast (deserializedObject.get()); } @@ -575,7 +575,7 @@ namespace VeraCrypt ServiceOutputStream = shared_ptr (new FileStream (outPipe->GetReadFD())); // Send sync code - byte sync[] = { 0, 0x11, 0x22 }; + uint8 sync[] = { 0, 0x11, 0x22 }; ServiceInputStream->Write (ConstBufferPtr (sync, array_capacity (sync))); AdminInputPipe = move_ptr(inPipe); diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp index 258979b9..26076a28 100644 --- a/src/Core/Unix/CoreUnix.cpp +++ b/src/Core/Unix/CoreUnix.cpp @@ -241,7 +241,7 @@ namespace VeraCrypt device.SeekAt (0); device.ReadCompleteBuffer (bootSector); - byte *b = bootSector.Ptr(); + uint8 *b = bootSector.Ptr(); return memcmp (b + 3, "NTFS", 4) != 0 && memcmp (b + 54, "FAT", 3) != 0 diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index 5d5ba38f..cd4be80f 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -386,7 +386,7 @@ namespace VeraCrypt dmCreateArgs << nativeDevPath << " 0"; SecureBuffer dmCreateArgsBuf (dmCreateArgs.str().size()); - dmCreateArgsBuf.CopyFrom (ConstBufferPtr ((byte *) dmCreateArgs.str().c_str(), dmCreateArgs.str().size())); + dmCreateArgsBuf.CopyFrom (ConstBufferPtr ((uint8 *) dmCreateArgs.str().c_str(), dmCreateArgs.str().size())); // Keys const SecureBuffer &cipherKey = cipher.GetKey(); -- cgit v1.2.3